From e71f79ea93d56cf58e4e21377ddc2f76b927d308 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 26 Jun 2020 23:15:12 +0200 Subject: [PATCH] Embed interactive console behavior in dockers --- .azure-pipelines/templates/steps/tox-steps.yml | 4 ---- certbot-compatibility-test/Dockerfile-apache | 2 +- certbot-compatibility-test/Dockerfile-nginx | 2 +- letsencrypt-auto-source/Dockerfile.jessie | 2 +- letsencrypt-auto-source/Dockerfile.redhat6 | 2 +- letsencrypt-auto-source/Dockerfile.xenial | 2 +- tox.ini | 12 ++++++------ 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.azure-pipelines/templates/steps/tox-steps.yml b/.azure-pipelines/templates/steps/tox-steps.yml index c73b3a961..88d505ac8 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -36,10 +36,6 @@ steps: - bash: | if [[ "${TOXENV}" == *"oldest"* ]]; then tools/run_oldest_tests.sh - elif command -v unbuffer >/dev/null 2>&1; then - # Call to unbuffer ensures that docker command can be run with - # -it while tox is not executed from an interactive console. - unbuffer -p python -m tox else python -m tox fi diff --git a/certbot-compatibility-test/Dockerfile-apache b/certbot-compatibility-test/Dockerfile-apache index 5c0495966..4843a4fcf 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 -ENTRYPOINT [ "certbot-compatibility-test", "-p", "apache" ] +CMD [ "script", "-c", "certbot-compatibility-test -p apache -c apache.tar.gz -vvvv" ] diff --git a/certbot-compatibility-test/Dockerfile-nginx b/certbot-compatibility-test/Dockerfile-nginx index 4ade03065..4ab8b2199 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 -ENTRYPOINT [ "certbot-compatibility-test", "-p", "nginx" ] +CMD [ "script", "-c", "certbot-compatibility-test -p nginx -c nginx.tar.gz -vv -aie" ] diff --git a/letsencrypt-auto-source/Dockerfile.jessie b/letsencrypt-auto-source/Dockerfile.jessie index 9ee37b763..8894ff5dc 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 ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"] +CMD ["script", "-c", "pytest -v -s certbot/letsencrypt-auto-source/tests"] diff --git a/letsencrypt-auto-source/Dockerfile.redhat6 b/letsencrypt-auto-source/Dockerfile.redhat6 index 66f21bc14..02439da3a 100644 --- a/letsencrypt-auto-source/Dockerfile.redhat6 +++ b/letsencrypt-auto-source/Dockerfile.redhat6 @@ -51,4 +51,4 @@ RUN cp /home/lea/certbot/letsencrypt-auto-source/tests/${REDHAT_DIST_FLAVOR}6_te USER lea WORKDIR /home/lea -CMD ["sudo", "certbot/letsencrypt-auto-source/tests/redhat6_tests.sh"] +CMD ["sudo", "script", "-c", "certbot/letsencrypt-auto-source/tests/redhat6_tests.sh"] diff --git a/letsencrypt-auto-source/Dockerfile.xenial b/letsencrypt-auto-source/Dockerfile.xenial index 931f1c6d3..0554441dc 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 ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"] +CMD ["script", "-c", "pytest -v -s certbot/letsencrypt-auto-source/tests"] diff --git a/tox.ini b/tox.ini index 54aa0169c..17273ae7e 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 -it apache-compat -c apache.tar.gz -vvvv + docker run --rm apache-compat 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 -it nginx-compat -c nginx.tar.gz -vv -aie + docker run --rm nginx-compat 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 -t -i lea + docker run --rm 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 -t -i lea + docker run --rm 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 -t -i lea + docker run --rm 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 -t -i lea + docker run --rm lea whitelist_externals = docker passenv = DOCKER_*