Module: Mesa Branch: main Commit: f8e583d537f5a3265cdac22a3b1df4d7ac2aaf94 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8e583d537f5a3265cdac22a3b1df4d7ac2aaf94
Author: Eric Engestrom <e...@igalia.com> Date: Wed Dec 13 10:46:43 2023 +0000 ci/b2c: identify dut by its id instead of its tags Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653> --- .gitlab-ci/b2c/b2c.yml.jinja2.jinja2 | 5 +---- .gitlab-ci/b2c/generate_b2c.py | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/b2c/b2c.yml.jinja2.jinja2 b/.gitlab-ci/b2c/b2c.yml.jinja2.jinja2 index 98cc03f304b..4ce5b12e1f0 100644 --- a/.gitlab-ci/b2c/b2c.yml.jinja2.jinja2 +++ b/.gitlab-ci/b2c/b2c.yml.jinja2.jinja2 @@ -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 diff --git a/.gitlab-ci/b2c/generate_b2c.py b/.gitlab-ci/b2c/generate_b2c.py index f3333763a55..d72d4890d43 100755 --- a/.gitlab-ci/b2c/generate_b2c.py +++ b/.gitlab-ci/b2c/generate_b2c.py @@ -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']