gitlab-ci/lava: add pipeline information in the lava job name
authorNeil Armstrong <narmstrong@baylibre.com>
Tue, 15 Oct 2019 13:22:07 +0000 (15:22 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Jan 2020 11:29:36 +0000 (11:29 +0000)
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 <narmstrong@baylibre.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2337>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2337>

.gitlab-ci/generate_lava.py
.gitlab-ci/lava-deqp.yml.jinja2
.gitlab-ci/lava-gitlab-ci.yml

index f7631e1f30c3f8c5023b5d822d4ff8d1dd828e67..87efeaefffb6ee1b80ed3b0ba54968f87c362504 100755 (executable)
@@ -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
index 73101a7aa85ab813249f9618e4cbf0d0d213986f..8b7b4b12034ffb57c788aa262e9b7df94ab6ec40 100644 (file)
@@ -1,4 +1,4 @@
-job_name: mesa-deqp-{{ gpu_version }}
+job_name: mesa-deqp-{{ gpu_version }} {{ pipeline_info }}
 device_type: {{ device_type }}
 timeouts:
   job:
index 3e34b036ee5efe4fc1886eadd0da6bf83a194f16..da771c5e406f35b40ee9b3da2a2283bf054c46df 100644 (file)
@@ -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}" \