mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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:
committed by
Brad King
co-authored by
Brad King
parent
d505cf03d9
commit
fff061d1e7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user