gitlab-ci: name pipelines

This makes it easier to see pipeline reasons in the web UI.

Co-authored-by: Brad King <brad.king@kitware.com>
This commit is contained in:
Ben Boeckel
2026-01-23 20:37:37 -05:00
committed by Brad King
co-authored by Brad King
parent d505cf03d9
commit fff061d1e7
+12
View File
@@ -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