From c84f36e809ec5f890f5905686194bc7786af4397 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 7 Nov 2018 00:33:55 +0000 Subject: [PATCH] issue #426: teach .ci/ Docker pulls to ignore -py3 image suffix. --- .ci/ansible_install.py | 2 +- .ci/ci_lib.py | 4 ++++ .ci/debops_common_install.py | 2 +- .ci/mitogen_install.py | 2 +- .ci/prep_azure.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.ci/ansible_install.py b/.ci/ansible_install.py index 167a9cb1..b2da2702 100755 --- a/.ci/ansible_install.py +++ b/.ci/ansible_install.py @@ -14,7 +14,7 @@ batches = [ ] batches.extend( - ['docker pull mitogen/%s-test' % (distro,)] + ['docker pull %s' % (ci_lib.image_for_distro(distro),)] for distro in ci_lib.DISTROS ) diff --git a/.ci/ci_lib.py b/.ci/ci_lib.py index 77cc30a2..7126887b 100644 --- a/.ci/ci_lib.py +++ b/.ci/ci_lib.py @@ -142,6 +142,10 @@ def get_docker_hostname(): return parsed.netloc.partition(':')[0] +def image_for_distro(distro): + return 'mitogen/%s-test' % (distro.partition('-')[0],) + + def make_containers(): docker_hostname = get_docker_hostname() return [ diff --git a/.ci/debops_common_install.py b/.ci/debops_common_install.py index 8830eaf6..32241449 100755 --- a/.ci/debops_common_install.py +++ b/.ci/debops_common_install.py @@ -13,6 +13,6 @@ ci_lib.run_batches([ 'pip install -qqqU debops==0.7.2 ansible==%s' % ci_lib.ANSIBLE_VERSION, ], [ - 'docker pull mitogen/debian-test', + 'docker pull %s' % (ci_lib.image_for_distro('debian'),), ], ]) diff --git a/.ci/mitogen_install.py b/.ci/mitogen_install.py index 4cc06c04..9afbe67d 100755 --- a/.ci/mitogen_install.py +++ b/.ci/mitogen_install.py @@ -8,7 +8,7 @@ batches = [ 'pip install -r tests/requirements.txt', ], [ - 'docker pull mitogen/%s-test' % (ci_lib.DISTRO,), + 'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO),), ] ] diff --git a/.ci/prep_azure.py b/.ci/prep_azure.py index 85c19947..10126df2 100755 --- a/.ci/prep_azure.py +++ b/.ci/prep_azure.py @@ -15,7 +15,7 @@ batches.append([ ]) batches.extend( - ['docker pull mitogen/%s-test' % (distro,)] + ['docker pull %s' % (ci_lib.image_for_distro(distro),)] for distro in ci_lib.DISTROS )