Merge pull request #854 from moreati/issue809

tests: Authenticate to AWS Elastic Container Registry for `docker pull`

fixes #789
pull/841/head^2
Alex Willmer 3 years ago committed by GitHub
commit f5683ae767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,12 +13,15 @@ batches = [
'-r tests/ansible/requirements.txt',
# encoding is required for installing ansible 2.10 with pip2, otherwise we get a UnicodeDecode error
'LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 pip install -q ansible=={0}'.format(ci_lib.ANSIBLE_VERSION)
],
[
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
]
]
batches.append(ci_lib.throttle(
batches[-1].extend([
'docker pull %s' % (ci_lib.image_for_distro(distro),)
for distro in ci_lib.DISTROS
))
])
ci_lib.run_batches(batches)

@ -18,6 +18,10 @@ steps:
- script: .ci/$(MODE)_install.py
displayName: "Run $(MODE)_install.py"
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
AWS_DEFAULT_REGION: $(AWS_DEFAULT_REGION)
- script: .ci/$(MODE)_tests.py
displayName: "Run $(MODE)_tests.py"

@ -13,6 +13,7 @@ ci_lib.run_batches([
'pip install -qqq debops[ansible]==2.1.2 ansible==%s' % ci_lib.ANSIBLE_VERSION,
],
[
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
'docker pull %s' % (ci_lib.image_for_distro('debian'),),
],
])

@ -11,6 +11,7 @@ batches = [
if ci_lib.have_docker():
batches.append([
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO),),
])

@ -4,6 +4,7 @@ import ci_lib
batches = [
[
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO),),
],
[

@ -17,6 +17,7 @@ cache:
- /home/travis/virtualenv
install:
- if ! [ -x "$(command -v aws)" ]; then curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" ; unzip awscliv2.zip ; sudo ./aws/install ; fi
- pip install -U pip==20.2.1
- .ci/${MODE}_install.py

Loading…
Cancel
Save