ci/b2c: pass through all the CI_* variables as well

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
This commit is contained in:
Eric Engestrom
2025-02-28 19:43:21 +01:00
committed by Marge Bot
parent bad0197300
commit 314e023960
2 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ version: 1
# Rules to match for a machine to qualify
target:
id: '{{ ci_runner_description }}'
id: '{{ CI_RUNNER_DESCRIPTION }}'
timeouts:
@@ -109,7 +109,7 @@ deployment:
{% endfor %}
b2c.run_service="--privileged --tls-verify=false --pid=host {{ B2C_TELEGRAF_IMAGE }}" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run="-ti --tls-verify=false {{ B2C_MACHINE_REGISTRATION_IMAGE }} {% if B2C_MARS_SETUP_TAGS %}setup --tags {{ B2C_MARS_SETUP_TAGS }}{% else %}check{% endif %}"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ CI_PROJECT_DIR }} -w {{ CI_PROJECT_DIR }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
kernel:
{% if B2C_KERNEL_URL %}
url: '{{ B2C_KERNEL_URL }}'
+2 -6
View File
@@ -25,10 +25,10 @@ from jinja2 import Environment, FileSystemLoader
from os import environ, path
# Pass through all the B2C environment variables
# Pass through all the CI and B2C environment variables
values = {
key: environ[key]
for key in environ if key.startswith("B2C_")
for key in environ if key.startswith("B2C_") or key.startswith("CI_")
}
env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE'])),
@@ -36,10 +36,6 @@ env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE
template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE']))
values['ci_job_id'] = environ['CI_JOB_ID']
values['ci_runner_description'] = environ['CI_RUNNER_DESCRIPTION']
values['working_dir'] = environ['CI_PROJECT_DIR']
# 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(