gitlab-ci: rule anchor for experimental devices as manual in MRs

We want to give developers the option to run their jobs on devices
that are still being stabilized in the CI infrastructure.

These jobs should be optional and not prevent merging from happening.

The is-forked-branch-or-pre-merge anchor was not being used anywhere,
so it was changed to is-forked-branch-or-pre-merge-not-for-marge to
create this new rule.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10405>
This commit is contained in:
Gustavo Padovan 2021-04-22 08:17:40 -03:00 committed by Marge Bot
parent b80720acb1
commit c5e06bb894
1 changed files with 15 additions and 2 deletions

View File

@ -65,8 +65,8 @@ stages:
# Forked project branch
- if: &is-forked-branch '$CI_PROJECT_NAMESPACE != "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
when: manual
# Forked project branch / pre-merge pipeline
- if: &is-forked-branch-or-pre-merge '$CI_PROJECT_NAMESPACE != "mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
# Forked project branch / pre-merge pipeline not for Marge bot
- if: &is-forked-branch-or-pre-merge-not-for-marge '$CI_PROJECT_NAMESPACE != "mesa" || ($GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME)'
when: manual
# Pipeline runs for the master branch of the main project
- if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "master"'
@ -1218,6 +1218,19 @@ meson-mingw32-x86_64:
variables:
GIT_STRATEGY: none
# The above .test-manual rules doesn't allow the jobs to be available for MRs
# but we should have an option to have manual jobs in MRs as well.
.test-manual-mr:
rules:
- *ignore_scheduled_pipelines
- if: *is-forked-branch-or-pre-merge-not-for-marge
changes:
*all_paths
when: manual
- when: never
variables:
GIT_STRATEGY: none
.baremetal-test:
extends:
- .ci-run-policy