From a3ad54adf078ff9ec2da730243ebafefce079f00 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 28 Feb 2025 21:58:42 +0100 Subject: [PATCH] ci/b2c: set the registry proxy from the job Part-of: --- .gitlab-ci/b2c/generate_b2c.py | 7 ------- .gitlab-ci/test/gitlab-ci.yml | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci/b2c/generate_b2c.py b/.gitlab-ci/b2c/generate_b2c.py index f2ebfd22589..001720ad266 100755 --- a/.gitlab-ci/b2c/generate_b2c.py +++ b/.gitlab-ci/b2c/generate_b2c.py @@ -36,12 +36,5 @@ env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE'])) -# Pull all our images through our proxy registry -for image in ['B2C_IMAGE_UNDER_TEST', 'B2C_MACHINE_REGISTRATION_IMAGE', 'B2C_TELEGRAF_IMAGE']: - values[image] = values[image].replace( - 'registry.freedesktop.org', - '{{ fdo_proxy_registry }}' - ) - with open(path.splitext(path.basename(environ['B2C_JOB_TEMPLATE']))[0], "w") as f: f.write(template.render(values)) diff --git a/.gitlab-ci/test/gitlab-ci.yml b/.gitlab-ci/test/gitlab-ci.yml index c9d5b11d54f..c8ebb7f99ed 100644 --- a/.gitlab-ci/test/gitlab-ci.yml +++ b/.gitlab-ci/test/gitlab-ci.yml @@ -409,6 +409,11 @@ yaml-toml-shell-py-test: [ -d "$CI_B2C_ARTIFACTS" ] || exit 1 [ -d "$CI_COMMON_SCRIPTS" ] || exit 1 + # Pull all our images through our proxy registry + B2C_IMAGE_UNDER_TEST=${B2C_IMAGE_UNDER_TEST//registry.freedesktop.org/{{ fdo_proxy_registry \}\}} + B2C_MACHINE_REGISTRATION_IMAGE=${B2C_MACHINE_REGISTRATION_IMAGE//registry.freedesktop.org/{{ fdo_proxy_registry \}\}} + B2C_TELEGRAF_IMAGE=${B2C_TELEGRAF_IMAGE//registry.freedesktop.org/{{ fdo_proxy_registry \}\}} + # The Valve CI gateway receives jobs in a YAML format. Create a # job description from the CI environment. python3 "$CI_B2C_ARTIFACTS"/generate_b2c.py