ci: Move rules from .build fedora x86_64 to .build

They should apply to all job that extend it as the 2 jobs that depend on
`.build` but not on `.build fedora x86_64` is
`build nodebug fedora x86_64` which pulls `build static nodebug fedora x86_64`
both jobs should be manual on `main` and they should run only if some
files "modules_changes" happened

Also make sure we do no automatically run job on `main` branches from forks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1141>
This commit is contained in:
Thibault Saunier 2021-10-13 18:10:40 -03:00 committed by GStreamer Marge Bot
parent eb839a8423
commit 64462f627b

View file

@ -114,7 +114,7 @@ trigger:
# If the MR is assigned to the Merge bot, trigger the pipeline automatically # If the MR is assigned to the Merge bot, trigger the pipeline automatically
- if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"' - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
# Alway run tests post merged # Alway run tests post merged
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
# When the assignee isn't the merge bot, require an explicit action to trigger the pipeline # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
# to avoid wasting CI resources # to avoid wasting CI resources
- if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"' - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
@ -330,6 +330,13 @@ gst indent:
when: "always" when: "always"
paths: paths:
- 'meson-logs/' - 'meson-logs/'
rules:
# If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: manual
- changes:
*modules_changes
.build fedora x86_64: .build fedora x86_64:
extends: extends:
@ -340,13 +347,6 @@ gst indent:
- "fedora amd64 docker" - "fedora amd64 docker"
variables: variables:
MESON_ARGS: *simple_build MESON_ARGS: *simple_build
rules:
# 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_UPSTREAM_BRANCH'
when: manual
- changes:
*modules_changes
build nodebug fedora x86_64: build nodebug fedora x86_64:
extends: extends:
@ -395,7 +395,7 @@ build clang fedora x86_64:
rules: rules:
# If this matches, it means the pipeline is running against either the main # If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual # or a stable branch, so make it manual
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: manual when: manual
- changes: - changes:
*modules_changes *modules_changes
@ -538,7 +538,7 @@ gstreamer-full:
rules: rules:
# If this matches, it means the pipeline is running against either the main # If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual # or a stable branch, so make it manual
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: manual when: manual
- changes: - changes:
- "*" - "*"
@ -708,7 +708,7 @@ valgrind ges:
- plugins-cache-diffs/ - plugins-cache-diffs/
# #
# This jobs runs in gsrtreamer namespace when after the merge into main branch. # This jobs runs in gstreamer namespace when after the merge into main branch.
# The produced artifact is later used to automatically update the web page. # The produced artifact is later used to automatically update the web page.
# #
documentation: documentation:
@ -730,7 +730,8 @@ build documentation:
needs: needs:
- "trigger" - "trigger"
rules: rules:
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' # Never run post merge, we have the `documentation` always running for that
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: never when: never
- changes: - changes:
- .gitlab-ci.yml - .gitlab-ci.yml
@ -762,7 +763,8 @@ cerbero trigger:
- ci/gitlab/trigger_cerbero_pipeline.py - ci/gitlab/trigger_cerbero_pipeline.py
rules: rules:
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' # Never run post merge
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: never when: never
- changes: - changes:
- .gitlab-ci.yml - .gitlab-ci.yml