Skip to contentSkip to conversation

ci: Give pipelines a name

PATCH Superseded Jan Kiszka 1 participant 1 message Feb 24

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 ci: Give pipelines a name

From: Jan Kiszka <[email protected]>

This should help to identify why a pipeline was started here, regular push, external repo trigger, schedule.

Requires that the xenomai 3 CI sets the TRIGGER_SOURCE variable before issuing the trigger.

---
 .gitlab-ci.yml          | 20 +++++++++++++++++++-
 ci/trigger/dovetail.yml |  1 +
 ci/trigger/evl.yml      |  1 +
 ci/trigger/libevl.yml   |  1 +
 4 files changed, 22 insertions(+), 1 deletion(-)
.gitlab-ci.yml +19 -1
index f810dd7..ffda862 100644
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019 - 2025
+# Copyright (c) Siemens AG, 2019 - 2026
 #
 # Authors:
 #  Quirin Gylstorff <[email protected]>
@@ -13,6 +13,24 @@ variables:
   LAVA_TESTS_ENABLED: "true"
   ALL_QEMU_JOBS: "false"
   CONTAINER_REGISTRY: "registry.gitlab.com"
+  PIPELINE_NAME: "Branch changed: $CI_COMMIT_BRANCH"
+
+workflow:
+  name: "$PIPELINE_NAME"
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "pipeline"'
+      variables:
+        PIPELINE_NAME: "Trigger: $TRIGGER_SOURCE"
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
+      variables:
+        PIPELINE_NAME: "Schedule: '$ONLY_RUN'"
+    - if: '$CI_PIPELINE_SOURCE == "web" && $ONLY_RUN != ""'
+      variables:
+        PIPELINE_NAME: "Manual: $ONLY_RUN"
+    - if: '$CI_PIPELINE_SOURCE == "web"'
+      variables:
+        PIPELINE_NAME: "Manual run"
+    - when: always
 
 stages:
   - parent
ci/trigger/dovetail.yml +1 -0
index 633ebc4..b904c1a 100644
@@ -59,5 +59,6 @@ trigger-xenomai-images:
     KERNEL_VERSION: $KERNEL_VERSION
     KERNEL_VERSION_WITH_QEMU: $KERNEL_VERSION
     ONLY_RUN: xenomai-3/dovetail
+    TRIGGER_SOURCE: linux-dovetail/$KERNEL_VERSION
   rules:
     - if: '$KERNEL_VERSION != ""'
ci/trigger/evl.yml +1 -0
index fdbd15d..fe87bcb 100644
@@ -59,5 +59,6 @@ trigger-xenomai-images:
     KERNEL_VERSION: $KERNEL_VERSION
     KERNEL_VERSION_WITH_QEMU: $KERNEL_VERSION
     ONLY_RUN: xenomai-4/evl
+    TRIGGER_SOURCE: linux-evl/$KERNEL_VERSION
   rules:
     - if: '$KERNEL_VERSION != ""'
ci/trigger/libevl.yml +1 -0
index ece5f06..bb996b4 100644
@@ -19,6 +19,7 @@ trigger-xenomai-images:
   stage: trigger_xenomai_images
   variables:
     ONLY_RUN: xenomai-4/${CI_COMMIT_BRANCH}
+    TRIGGER_SOURCE: libevl/next
   trigger:
     project: xenomai/xenomai-images
     branch: next
Signature · 1 line
2.47.3