From dc594c95ddc66888e5971a8684a62b0c11ec9885 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Tue, 15 Oct 2019 15:22:07 +0200 Subject: [PATCH] gitlab-ci/lava: add pipeline information in the lava job name In order to have more informations in the LAVA jobs list, add the current pipeline URL and commit ref name in the LAVA job name. Signed-off-by: Neil Armstrong Reviewed-by: Tomeu Vizoso Reviewed-by: Daniel Stone Tested-by: Marge Bot Part-of: --- .gitlab-ci/generate_lava.py | 2 ++ .gitlab-ci/lava-deqp.yml.jinja2 | 2 +- .gitlab-ci/lava-gitlab-ci.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/generate_lava.py b/.gitlab-ci/generate_lava.py index f7631e1f30c..87efeaefffb 100755 --- a/.gitlab-ci/generate_lava.py +++ b/.gitlab-ci/generate_lava.py @@ -6,6 +6,7 @@ import os parser = argparse.ArgumentParser() parser.add_argument("--template") +parser.add_argument("--pipeline-info") parser.add_argument("--base-artifacts-url") parser.add_argument("--device-type") parser.add_argument("--kernel-image-name") @@ -24,6 +25,7 @@ env = Environment(loader = FileSystemLoader(os.path.dirname(args.template)), tri template = env.get_template(os.path.basename(args.template)) values = {} +values['pipeline_info'] = args.pipeline_info values['base_artifacts_url'] = args.base_artifacts_url values['device_type'] = args.device_type values['kernel_image_name'] = args.kernel_image_name diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2 index 73101a7aa85..8b7b4b12034 100644 --- a/.gitlab-ci/lava-deqp.yml.jinja2 +++ b/.gitlab-ci/lava-deqp.yml.jinja2 @@ -1,4 +1,4 @@ -job_name: mesa-deqp-{{ gpu_version }} +job_name: mesa-deqp-{{ gpu_version }} {{ pipeline_info }} device_type: {{ device_type }} timeouts: job: diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml index 3e34b036ee5..da771c5e406 100644 --- a/.gitlab-ci/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -10,6 +10,7 @@ - > artifacts/generate_lava.py \ --template artifacts/lava-deqp.yml.jinja2 \ + --pipeline-info "$CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \ --base-artifacts-url $CI_PROJECT_URL/-/jobs/$BUILD_JOB_ID/artifacts/raw/artifacts \ --device-type ${DEVICE_TYPE} \ --env-vars "${ENV_VARS}" \ -- 2.30.2