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 f7631e1..87efeae 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 73101a7..8b7b4b1 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 3e34b03..da771c5 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}" \