Skip to content

Commit f5683ae

Browse files
authored
Merge pull request #854 from moreati/issue809
tests: Authenticate to AWS Elastic Container Registry for `docker pull` fixes #789
2 parents 2f56b16 + 0db7467 commit f5683ae

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

.ci/ansible_install.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
'-r tests/ansible/requirements.txt',
1414
# encoding is required for installing ansible 2.10 with pip2, otherwise we get a UnicodeDecode error
1515
'LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 pip install -q ansible=={0}'.format(ci_lib.ANSIBLE_VERSION)
16+
],
17+
[
18+
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
1619
]
1720
]
1821

19-
batches.append(ci_lib.throttle(
22+
batches[-1].extend([
2023
'docker pull %s' % (ci_lib.image_for_distro(distro),)
2124
for distro in ci_lib.DISTROS
22-
))
25+
])
2326

2427
ci_lib.run_batches(batches)

.ci/azure-pipelines-steps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ steps:
1818

1919
- script: .ci/$(MODE)_install.py
2020
displayName: "Run $(MODE)_install.py"
21+
env:
22+
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
23+
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
24+
AWS_DEFAULT_REGION: $(AWS_DEFAULT_REGION)
2125

2226
- script: .ci/$(MODE)_tests.py
2327
displayName: "Run $(MODE)_tests.py"

.ci/debops_common_install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'pip install -qqq debops[ansible]==2.1.2 ansible==%s' % ci_lib.ANSIBLE_VERSION,
1414
],
1515
[
16+
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
1617
'docker pull %s' % (ci_lib.image_for_distro('debian'),),
1718
],
1819
])

.ci/mitogen_install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
if ci_lib.have_docker():
1313
batches.append([
14+
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
1415
'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO),),
1516
])
1617

.ci/mitogen_py24_install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
batches = [
66
[
7+
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
78
'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO),),
89
],
910
[

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ cache:
1717
- /home/travis/virtualenv
1818

1919
install:
20+
- 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
2021
- pip install -U pip==20.2.1
2122
- .ci/${MODE}_install.py
2223

0 commit comments

Comments
 (0)