mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
citemplate: rework gitlab rules
Rework rules of jobs to prever duplicate pipelines. https://docs.gitlab.com/ce/ci/yaml/README.html#prevent-duplicate-pipelines Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/331>
This commit is contained in:
parent
524a75e6ff
commit
2a3589dc2d
1 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
include:
|
||||||
|
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- 'build docker'
|
- 'build docker'
|
||||||
- 'preparation'
|
- 'preparation'
|
||||||
|
@ -318,13 +321,23 @@ gst-indent amd64 docker:
|
||||||
manifest:
|
manifest:
|
||||||
image: $MANIFEST_IMAGE
|
image: $MANIFEST_IMAGE
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME && $GITLAB_USER_LOGIN == "gstreamer-merge-bot"'
|
# Always have automatic pipeline for branchs in cerbero and docs
|
||||||
when: 'always'
|
# cause they need to update artifacts, like the docs site or cerbero deps
|
||||||
- if: '$CI_PROJECT_PATH == "gstreamer/cerbero"'
|
- if: '$CI_PROJECT_PATH == "gstreamer/cerbero"'
|
||||||
when: 'always'
|
|
||||||
- if: '$CI_PROJECT_PATH == "gstreamer/gst-docs"'
|
- if: '$CI_PROJECT_PATH == "gstreamer/gst-docs"'
|
||||||
when: 'always'
|
|
||||||
- when: 'manual'
|
# If the user that triggered the Pipeline is the Merge bot and the branch doesn't match
|
||||||
|
# the upstream branch set, run the pipeline
|
||||||
|
- if: '$GITLAB_USER_LOGIN == "gstreamer-merge-bot" && $CI_COMMIT_BRANCH != "$GST_UPS_BRANCH"'
|
||||||
|
# When the user isn't the merge bot, require an explicit action to trigger the pipeline
|
||||||
|
# to avoid wasting CI resources
|
||||||
|
- if: '$GITLAB_USER_LOGIN != "gstreamer-merge-bot"'
|
||||||
|
when: 'manual'
|
||||||
|
# If this matches, it means the pipeline is running against either the main
|
||||||
|
# or a stable branch, so make it manual
|
||||||
|
- if: '$CI_COMMIT_BRANCH == "$GST_UPS_BRANCH"'
|
||||||
|
when: 'manual'
|
||||||
|
|
||||||
stage: 'preparation'
|
stage: 'preparation'
|
||||||
script:
|
script:
|
||||||
- cd /gst-ci
|
- cd /gst-ci
|
||||||
|
|
Loading…
Reference in a new issue