ci/b2c: identify dut by its id instead of its tags

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
This commit is contained in:
Eric Engestrom 2023-12-13 10:46:43 +00:00 committed by Marge Bot
parent b93d836e47
commit f8e583d537
2 changed files with 2 additions and 9 deletions

View file

@ -2,10 +2,7 @@ version: 1
# Rules to match for a machine to qualify
target:
tags:
{% for tag in tags %}
- '{{ tag | trim }}'
{% endfor %}
id: '{{ ci_runner_id }}'
timeouts:
first_console_activity: # This limits the time it can take to receive the first console log

View file

@ -23,7 +23,6 @@
from jinja2 import Environment, FileSystemLoader
from os import environ, path
import json
# Pass all the environment variables prefixed by B2C_
@ -38,10 +37,7 @@ env = Environment(loader=FileSystemLoader(path.dirname(values['job_template'])),
template = env.get_template(path.basename(values['job_template']))
values['ci_job_id'] = environ['CI_JOB_ID']
try:
values['tags'] = json.loads(environ['CI_RUNNER_TAGS'])
except json.decoder.JSONDecodeError:
values['tags'] = environ['CI_RUNNER_TAGS'].split(",")
values['ci_runner_id'] = environ['CI_RUNNER_ID']
values['job_volume_exclusions'] = [excl for excl in values['job_volume_exclusions'].split(",") if excl]
values['working_dir'] = environ['CI_PROJECT_DIR']