From fff061d1e70f683ec2ec71bbbce9e8da2df3f0f9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 15 Jan 2026 22:18:48 -0500 Subject: [PATCH] gitlab-ci: name pipelines This makes it easier to see pipeline reasons in the web UI. Co-authored-by: Brad King --- .gitlab/rules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index b224cc0bfb..8fbf96c998 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -42,8 +42,12 @@ ## Set to the name of the staging branch where continuous pipelines run. #### +variables: + CMAKE_CI_PIPELINE_NAME: 'Branch "$CI_COMMIT_REF_NAME"' + # When to even consider running a pipeline. workflow: + name: "$CMAKE_CI_PIPELINE_NAME" rules: # Run for merge requests. - if: '$CI_MERGE_REQUEST_ID' @@ -51,6 +55,8 @@ workflow: auto_cancel: # Cancel all pipeline jobs if a new commit comes in on the branch/tag. on_new_commit: interruptible + variables: + CMAKE_CI_PIPELINE_NAME: 'Merge request !$CI_MERGE_REQUEST_IID' # If this is not a MR, do not run for other projects. - if: '$CI_PROJECT_PATH != "cmake/cmake" && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == null && $CMAKE_CI_PROJECT_MAIN_BRANCH == null' when: never @@ -60,15 +66,21 @@ workflow: auto_cancel: # Never cancel scheduled pipelines because of new commits. on_new_commit: none + variables: + CMAKE_CI_PIPELINE_NAME: 'Schedule "$CI_PIPELINE_SCHEDULE_DESCRIPTION"' # Run for protected branches. - if: '$CI_COMMIT_REF_PROTECTED == "true"' when: always auto_cancel: # Cancel all pipeline jobs if a new commit comes in on the branch. on_new_commit: interruptible + variables: + CMAKE_CI_PIPELINE_NAME: 'Protected branch "$CI_COMMIT_REF_NAME"' # Run for tags. - if: '$CI_COMMIT_TAG' when: always + variables: + CMAKE_CI_PIPELINE_NAME: 'Tag "$CI_COMMIT_TAG"' # Skip pipelines in all other cases. - when: never