From f17406e364178358b8da3853626addfcf703b0f5 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sat, 27 Jun 2020 20:52:43 +0200 Subject: [PATCH] Revert "Embed interactive console behavior in dockers" This reverts commit e71f79ea93d56cf58e4e21377ddc2f76b927d308. --- certbot-compatibility-test/Dockerfile-apache | 2 +- certbot-compatibility-test/Dockerfile-nginx | 2 +- letsencrypt-auto-source/Dockerfile.jessie | 2 +- letsencrypt-auto-source/Dockerfile.redhat6 | 6 ++-- letsencrypt-auto-source/Dockerfile.xenial | 2 +- tox.ini | 37 ++++++++++++++------ 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/certbot-compatibility-test/Dockerfile-apache b/certbot-compatibility-test/Dockerfile-apache index c7b294cce..5c0495966 100644 --- a/certbot-compatibility-test/Dockerfile-apache +++ b/certbot-compatibility-test/Dockerfile-apache @@ -3,4 +3,4 @@ MAINTAINER Brad Warren RUN apt-get install apache2 -y -CMD [ "script", "-qec", "certbot-compatibility-test -p apache -c apache.tar.gz -vvvv" ] +ENTRYPOINT [ "certbot-compatibility-test", "-p", "apache" ] diff --git a/certbot-compatibility-test/Dockerfile-nginx b/certbot-compatibility-test/Dockerfile-nginx index 03eff9c7c..4ade03065 100644 --- a/certbot-compatibility-test/Dockerfile-nginx +++ b/certbot-compatibility-test/Dockerfile-nginx @@ -3,4 +3,4 @@ MAINTAINER Brad Warren RUN apt-get install nginx -y -CMD [ "script", "-qec", "certbot-compatibility-test -p nginx -c nginx.tar.gz -vv -aie" ] +ENTRYPOINT [ "certbot-compatibility-test", "-p", "nginx" ] diff --git a/letsencrypt-auto-source/Dockerfile.jessie b/letsencrypt-auto-source/Dockerfile.jessie index 843e7848c..9ee37b763 100644 --- a/letsencrypt-auto-source/Dockerfile.jessie +++ b/letsencrypt-auto-source/Dockerfile.jessie @@ -32,4 +32,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source USER lea WORKDIR /home/lea -CMD ["script", "-qec", "pytest -v -s certbot/letsencrypt-auto-source/tests"] +CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"] diff --git a/letsencrypt-auto-source/Dockerfile.redhat6 b/letsencrypt-auto-source/Dockerfile.redhat6 index 122b8c379..66f21bc14 100644 --- a/letsencrypt-auto-source/Dockerfile.redhat6 +++ b/letsencrypt-auto-source/Dockerfile.redhat6 @@ -9,8 +9,8 @@ ARG REDHAT_DIST_FLAVOR RUN curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ && rpm -ivh epel-release-latest-6.noarch.rpm -# Install pip, sudo and additional utils: -RUN yum install -y python-pip sudo util-linux-ng +# Install pip and sudo: +RUN yum install -y python-pip sudo # Update to a stable and tested version of pip. # We do not use pipstrap here because it no longer supports Python 2.6. RUN pip install pip==9.0.1 setuptools==29.0.1 wheel==0.29.0 @@ -51,4 +51,4 @@ RUN cp /home/lea/certbot/letsencrypt-auto-source/tests/${REDHAT_DIST_FLAVOR}6_te USER lea WORKDIR /home/lea -CMD ["script", "-qec", "sudo certbot/letsencrypt-auto-source/tests/redhat6_tests.sh"] +CMD ["sudo", "certbot/letsencrypt-auto-source/tests/redhat6_tests.sh"] diff --git a/letsencrypt-auto-source/Dockerfile.xenial b/letsencrypt-auto-source/Dockerfile.xenial index 6b6e60e2e..931f1c6d3 100644 --- a/letsencrypt-auto-source/Dockerfile.xenial +++ b/letsencrypt-auto-source/Dockerfile.xenial @@ -33,4 +33,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source USER lea WORKDIR /home/lea -CMD ["script", "-qec", "pytest -v -s certbot/letsencrypt-auto-source/tests"] +CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"] diff --git a/tox.ini b/tox.ini index 749b09db5..54aa0169c 100644 --- a/tox.ini +++ b/tox.ini @@ -170,7 +170,7 @@ commands = commands = docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile . docker build -t apache-compat -f certbot-compatibility-test/Dockerfile-apache . - docker run --rm apache-compat + docker run --rm -it apache-compat -c apache.tar.gz -vvvv whitelist_externals = docker passenv = @@ -180,7 +180,7 @@ passenv = commands = docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile . docker build -t nginx-compat -f certbot-compatibility-test/Dockerfile-nginx . - docker run --rm nginx-compat + docker run --rm -it nginx-compat -c nginx.tar.gz -vv -aie whitelist_externals = docker passenv = @@ -191,7 +191,7 @@ passenv = commands = python {toxinidir}/tests/modification-check.py docker build -f letsencrypt-auto-source/Dockerfile.xenial -t lea letsencrypt-auto-source - docker run --rm lea + docker run --rm -t -i lea whitelist_externals = docker passenv = @@ -203,7 +203,7 @@ passenv = # readily available on the Wheezy Docker image. commands = docker build -f letsencrypt-auto-source/Dockerfile.jessie -t lea letsencrypt-auto-source - docker run --rm lea + docker run --rm -t -i lea whitelist_externals = docker passenv = DOCKER_* @@ -213,7 +213,7 @@ passenv = DOCKER_* # readily available on the CentOS 6 Docker image. commands = docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=centos -t lea letsencrypt-auto-source - docker run --rm lea + docker run --rm -t -i lea whitelist_externals = docker passenv = DOCKER_* @@ -223,7 +223,7 @@ passenv = DOCKER_* # readily available on the Oracle Linux 6 Docker image. commands = docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=oraclelinux -t lea letsencrypt-auto-source - docker run --rm lea + docker run --rm -t -i lea whitelist_externals = docker passenv = DOCKER_* @@ -285,34 +285,49 @@ setenv = {[testenv:py27-oldest]setenv} [testenv:azure-test-farm-tests-base] changedir = tests/letstest +commands = + ./azure-setup.sh deps = -rtests/letstest/requirements.txt -passenv = AWS_* +passenv = + AWS_* + SYSTEM_DEFAULTWORKINGDIRECTORY + BUILD_SOURCEBRANCHNAME + FARMTEST_SECURE_KEY + FARMTEST_SECURE_IV setenv = AWS_DEFAULT_REGION=us-east-1 [testenv:azure-test-farm-apache2] changedir = {[testenv:azure-test-farm-tests-base]changedir} -commands = python multitester.py apache2_targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_apache2.sh --path {toxinidir} +commands = + {[testenv:azure-test-farm-tests-base]commands} + python multitester.py apache2_targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_apache2.sh --repo {env:SYSTEM_DEFAULTWORKINGDIRECTORY} --branch {env:BUILD_SOURCEBRANCHNAME} deps = {[testenv:azure-test-farm-tests-base]deps} passenv = {[testenv:azure-test-farm-tests-base]passenv} setenv = {[testenv:azure-test-farm-tests-base]setenv} [testenv:azure-test-farm-leauto-upgrades] changedir = {[testenv:azure-test-farm-tests-base]changedir} -commands = python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_leauto_upgrades.sh --path {toxinidir} +commands = + {[testenv:azure-test-farm-tests-base]commands} + python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_leauto_upgrades.sh --repo {env:SYSTEM_DEFAULTWORKINGDIRECTORY} --branch {env:BUILD_SOURCEBRANCHNAME} deps = {[testenv:azure-test-farm-tests-base]deps} passenv = {[testenv:azure-test-farm-tests-base]passenv} setenv = {[testenv:azure-test-farm-tests-base]setenv} [testenv:azure-test-farm-certonly-standalone] changedir = {[testenv:azure-test-farm-tests-base]changedir} -commands = python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_letsencrypt_auto_certonly_standalone.sh --path {toxinidir} +commands = + {[testenv:azure-test-farm-tests-base]commands} + python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_letsencrypt_auto_certonly_standalone.sh --repo {env:SYSTEM_DEFAULTWORKINGDIRECTORY} --branch {env:BUILD_SOURCEBRANCHNAME} deps = {[testenv:azure-test-farm-tests-base]deps} passenv = {[testenv:azure-test-farm-tests-base]passenv} setenv = {[testenv:azure-test-farm-tests-base]setenv} [testenv:azure-test-farm-sdists] changedir = {[testenv:azure-test-farm-tests-base]changedir} -commands = python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_sdists.sh --path {toxinidir} +commands = + {[testenv:azure-test-farm-tests-base]commands} + python multitester.py targets.yaml azure-test-farm.pem SET_BY_ENV scripts/test_sdists.sh --repo {env:SYSTEM_DEFAULTWORKINGDIRECTORY} --branch {env:BUILD_SOURCEBRANCHNAME} deps = {[testenv:azure-test-farm-tests-base]deps} passenv = {[testenv:azure-test-farm-tests-base]passenv} setenv = {[testenv:azure-test-farm-tests-base]setenv}