From 5a6a88f58ce23de1d0caddb26e456d89a08321a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Mon, 20 Jan 2020 18:39:50 +0100 Subject: [PATCH] gitlab-ci: Use single if for manual job rules entry I thought multiple ifs would all need to match, but looks like only the last one (or either one?) does. This should prevent a manual pipeline from getting created after merging changes which can't affect the pipeline. Reviewed-by: Eric Engestrom Tested-by: Marge Bot Part-of: --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46cacb60e39..90bb3b33fef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,7 @@ stages: *paths when: on_success # Allow triggering jobs manually on branches of forked projects - - if: '$CI_PROJECT_PATH != "mesa/mesa"' - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' + - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' when: manual # Otherwise, most jobs won't run - when: never -- 2.30.2