Commit ef8e5d9f authored by André Anjos's avatar André Anjos 💬

[test] Initializes docker.idiap.ch auth token if running on the CI

parent 7de14a37
Pipeline #27132 canceled with stage
in 1 minute and 32 seconds
......@@ -103,8 +103,13 @@ def setup_package():
for installed_tag in installed_image.tags:
if installed_tag == ('%s:%s' % (image, tag)):
has_image = True
if not has_image:
client.images.pull(image, tag)
if not has_image: #must pull (network connection required)
token = os.environ.get('CI_BUILD_TOKEN')
params = (image, tag)
if token is not None: #running on CI, setup
auth_config = dict(username='gitlab-ci-token', password=token)
params += (auth_config,)
client.images.pull(*params)
if DOCKER_NETWORK_TEST_ENABLED:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment