ci/b2c: set the registry proxy from the job

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
This commit is contained in:
Eric Engestrom 2025-02-28 21:58:42 +01:00 committed by Marge Bot
parent 314e023960
commit a3ad54adf0
2 changed files with 5 additions and 7 deletions

View file

@ -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))

View file

@ -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