From 8cb450f769b7a9cc7b82df4eeb8235e379803f06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 8 Sep 2020 18:02:58 +0200 Subject: [PATCH] ci: Always use CI_PROJECT_NAMESPACE instead of CI_PROJECT_PATH And always check it first. Cleanup for consistency. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41f1eb9..076e64e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,10 +48,10 @@ stages: - if: &is-for-marge '$GITLAB_USER_LOGIN == "marge-bot"' when: never # Forked project branch - - if: &is-forked-branch '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' + - 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_PATH != "mesa/mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME' + - if: &is-forked-branch-or-pre-merge '$CI_PROJECT_NAMESPACE != "mesa" || $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"' @@ -60,7 +60,7 @@ stages: - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' when: on_success # Post-merge pipeline, not for Marge Bot - - if: &is-post-merge-not-for-marge '$GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == "mesa/mesa"' + - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' when: on_success # Pre-merge pipeline - if: &is-pre-merge '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME' -- 2.7.4