From c5e06bb89454cd7c7d52cc59ea99c8bb92a99089 Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Thu, 22 Apr 2021 08:17:40 -0300 Subject: [PATCH] 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 Reviewed-by: Eric Anholt Part-of: --- .gitlab-ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22f8d133b8b..c3b3afed6d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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