Closed phracek closed 6 months ago
[test]
Rebased against master
[test]
Have you tried to use the .build-args files directly from these function? Was that difficult? I did not try that myself, I was just wondering if it possible/sensible way to implement this.
Sure. It does not work from CLI. --ulimit nofile=4096:4096
is called in examples/from-dockerfile
which does not support .build-args
[test-all]
Sure. It does not work from CLI. --ulimit nofile=4096:4096 is called in examples/from-dockerfile which does not support .build-args
I mean adding support for .build-args directly to test scripts. But as I said, I am not sure, if that will make any sense.
Sure. It does not work from CLI. --ulimit nofile=4096:4096 is called in examples/from-dockerfile which does not support .build-args
I mean adding support for .build-args directly to test scripts. But as I said, I am not sure, if that will make any sense.
This would mean, that all containers that are using function ct_test_app_dockerfile will use .build-args as well. I guess, we need to allow this only for relevant containers and to all of them.
This would mean, that all containers that are using function ct_test_app_dockerfile will use .build-args as well. I guess, we need to allow this only for relevant containers and to all of them.
OK, let's leave it as it is in this PR. [test]
The failures are expected because the new versions do not have devel repos.
RHEL7 s2i-python-container failure:
[PASSED] for 'mod-wsgi-test-app' test_application_with_user (00:00:05)
[PASSED] for 'mod-wsgi-test-app' test_application_enable_init_wrapper (00:00:04)
[FAILED] for 'pin-pipenv-version-test-app' run_s2i_build ()
[PASSED] for 'micropipenv-requirements-test-app' run_s2i_build ()
[PASSED] for 'micropipenv-requirements-test-app' test_s2i_usage (00:00:00)
@frenzymadness Do you know where there could be a problem? RHEL7 - Python 3.8
[1m[INFO] Preparing to test pin-pipenv-version-test-app ...[0m
Initialized empty Git repository in /root/sclorg/container-common-scripts/s2i-python-container/3.8/test/pin-pipenv-version-test-app/.git/
[master (root-commit) 52458b7] Sample commit
4 files changed, 37 insertions(+)
create mode 100644 .s2i/environment
create mode 100755 app.sh
create mode 100644 requirements.txt
create mode 100644 wsgi.py
[1m[INFO] Building the pin-pipenv-version-test-app application image ...[0m
Sending build context to Docker daemon 56.32 kB
Step 1/10 : FROM rhscl/python-38-rhel7:1
---> 5bea623439d7
[ snipped]
Step 9/10 : RUN /usr/libexec/s2i/assemble
---> Running in 8d14715764fc
[91m[0m---> Installing application source ...
---> Installing pipenv packaging tool ...
Collecting pipenv==2021.5.29
Downloading https://files.pythonhosted.org/packages/c1/a3/d266421362565864f130cb97f55f70c763b843c9a67311d215d75b7ec464/pipenv-2021.5.29-py2.py3-none-any.whl (3.9MB)
Requirement already satisfied, skipping upgrade: pip>=18.0 in ./.local/venvs/pipenv/lib/python3.8/site-packages (from pipenv==2021.5.29) (19.3.1)
Collecting virtualenv-clone>=0.2.5
Downloading https://files.pythonhosted.org/packages/21/ac/e07058dc5a6c1b97f751d24f20d4b0ec14d735d77f4a1f78c471d6d13a43/virtualenv_clone-0.5.7-py3-none-any.whl
Collecting virtualenv
Downloading https://files.pythonhosted.org/packages/16/65/0d0bdfdac31e2db8c6d6c18fe1e00236f0dea279f9846f94a9aafa49cfc9/virtualenv-20.25.1-py3-none-any.whl (3.8MB)
Collecting certifi
Downloading https://files.pythonhosted.org/packages/ba/06/a07f096c664aeb9f01624f858c3add0a4e913d6c96257acb4fce61e7de14/certifi-2024.2.2-py3-none-any.whl (163kB)
Requirement already satisfied, skipping upgrade: setuptools>=36.2.1 in ./.local/venvs/pipenv/lib/python3.8/site-packages (from pipenv==2021.5.29) (41.6.0)
Collecting platformdirs<5,>=3.9.1
Downloading https://files.pythonhosted.org/packages/55/72/4898c44ee9ea6f43396fbc23d9bfaf3d06e01b83698bdf2e4c919deceb7c/platformdirs-4.2.0-py3-none-any.whl
Collecting filelock<4,>=3.12.2
Downloading https://files.pythonhosted.org/packages/81/54/84d42a0bee35edba99dee7b59a8d4970eccdd44b99fe728ed912106fc781/filelock-3.13.1-py3-none-any.whl
Collecting distlib<1,>=0.3.7
Downloading https://files.pythonhosted.org/packages/8e/41/9307e4f5f9976bc8b7fea0b66367734e8faf3ec84bc0d412d8cfabbb66cd/distlib-0.3.8-py2.py3-none-any.whl (468kB)
Installing collected packages: virtualenv-clone, platformdirs, filelock, distlib, virtualenv, certifi, pipenv
Successfully installed certifi-2024.2.2 distlib-0.3.8 filelock-3.13.1 pipenv-2021.5.29 platformdirs-4.2.0 virtualenv-20.25.1 virtualenv-clone-0.5.7
[91mWARNING: You are using pip version 19.3.1; however, version 24.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[0m---> Installing dependencies via pipenv ...
[91mCourtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
[0m[91mCreating a Pipfile for this project...
[0m[91mRequirements file provided! Importing into Pipfile...
[0m[91mPipfile.lock not found, creating...
[0m[91mLocking [dev-packages] dependencies...
[0m[91mLocking [packages] dependencies...
[0m[91m
⠋ Locking...[0m[91m
Building requirements...
[0m[91m
[0m[91mResolving dependencies...
[0m[91m
⠙ Locking...[0m[91m
[snipped]
⠸ Locking...[0m[91m
⠼ Locking...[0m[91m[0m[91m✔ Success!
[0m[91mUpdated Pipfile.lock (9a5f62)!
[0mInstalling dependencies from Pipfile.lock (9a5f62)...
[91mAn error occurred while installing uwsgi==2.0.24 --hash=sha256:77b6dd5cd633f4ae87ee393f7701f617736815499407376e78f3d16467523afe! Will try again.
[0mInstalling initially failed dependencies...
[91m[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
[InstallError]: retcode = do_install(
[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
[InstallError]: do_init(
[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]: do_install_dependencies(
[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]: batch_install(
[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]: File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[0m[91m[pipenv.exceptions.InstallError]: Usage:
[pipenv.exceptions.InstallError]: pip install [options] <requirement specifier> [package-index-options] ...
[pipenv.exceptions.InstallError]: pip install [options] -r <requirements file> [package-index-options] ...
[pipenv.exceptions.InstallError]: pip install [options] [-e] <vcs project url> ...
[pipenv.exceptions.InstallError]: pip install [options] [-e] <local project path> ...
[pipenv.exceptions.InstallError]: pip install [options] <archive url/path> ...
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: --no-use-pep517 error: It is not possible to use --no-use-pep517
[pipenv.exceptions.InstallError]: without setuptools and wheel installed.
ERROR: Couldn't install package: uwsgi
Package installation failed...
[0mThe command '/bin/sh -c /usr/libexec/s2i/assemble' returned a non-zero code: 1
ERROR: Failed to to build /tmp/tmp.EsyMtJ5mKt/Dockerfile.CeZz
[1m[INFO] TEST FAILED (positive), EXPECTED:0 GOT:1[0m
@frenzymadness Do you know where there could be a problem? RHEL7 - Python 3.8
I think this is the same issue as https://github.com/sclorg/s2i-python-container/issues/661.
This commit was tested on two containers. nginx-container and s2i-nodejs-container.
nginx-container uses https://github.com/sclorg/nginx-container/blob/2ba264983b1236c6299eb83c62e4db9f40959f36/test/run#L418 s2i-nodejs-container pull request is here: https://github.com/sclorg/s2i-nodejs-container/pull/421
In whole SCLORG organization https://github.com/search?q=org%3Asclorg++ct_test_app_dockerfile&type=code
It is not used port as a parameter at all, therefore removing it from function as a parameter makes sense.
nginx-container test status:
s2i-nodejs-container test status: