ci: Use $CI_COMMIT_BRANCH
This was recently added to indicate pipelines for branches. v2: * Modify .gitlab-ci/test-source-dep.yml as well. Acked-by: Emma Anholt <emma@anholt.net> # v1 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14225>
This commit is contained in:
@@ -96,20 +96,20 @@ stages:
|
|||||||
# For Marge Bot
|
# For Marge Bot
|
||||||
- if: &is-for-marge '$GITLAB_USER_LOGIN == "marge-bot"'
|
- if: &is-for-marge '$GITLAB_USER_LOGIN == "marge-bot"'
|
||||||
when: never
|
when: never
|
||||||
# Forked project branch
|
# Pipeline for forked project branch
|
||||||
- if: &is-forked-branch '$CI_PROJECT_NAMESPACE != "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
|
- if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
|
||||||
when: manual
|
when: manual
|
||||||
# Forked project branch / pre-merge pipeline not for Marge bot
|
# 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)'
|
- 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
|
when: manual
|
||||||
# Pipeline runs for the main branch of the upstream Mesa project
|
# Pipeline runs for the main branch of the upstream Mesa project
|
||||||
- if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_DEFAULT_BRANCH'
|
- if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
|
||||||
when: always
|
when: always
|
||||||
# Post-merge pipeline
|
# Post-merge pipeline
|
||||||
- if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
|
- if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
||||||
when: on_success
|
when: on_success
|
||||||
# Post-merge pipeline, not for Marge Bot
|
# Post-merge pipeline, not for Marge Bot
|
||||||
- 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'
|
- if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
|
||||||
when: on_success
|
when: on_success
|
||||||
# Pre-merge pipeline
|
# Pre-merge pipeline
|
||||||
- if: &is-pre-merge '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
|
- if: &is-pre-merge '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
|
||||||
|
@@ -179,7 +179,7 @@
|
|||||||
when: never
|
when: never
|
||||||
# If the triggerer has access to the restricted traces and if it is pre-merge
|
# If the triggerer has access to the restricted traces and if it is pre-merge
|
||||||
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu)$/") &&
|
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu)$/") &&
|
||||||
($GITLAB_USER_LOGIN != "marge-bot" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME)'
|
($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
|
||||||
when: never
|
when: never
|
||||||
- *ignore_scheduled_pipelines
|
- *ignore_scheduled_pipelines
|
||||||
- changes:
|
- changes:
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
when: never
|
when: never
|
||||||
- *ignore_scheduled_pipelines
|
- *ignore_scheduled_pipelines
|
||||||
# Run only on pre-merge pipelines from Marge
|
# Run only on pre-merge pipelines from Marge
|
||||||
- if: '$GITLAB_USER_LOGIN != "marge-bot" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
|
- if: '$GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH'
|
||||||
when: never
|
when: never
|
||||||
- changes:
|
- changes:
|
||||||
*mesa_core_file_list
|
*mesa_core_file_list
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
rules:
|
rules:
|
||||||
- *ignore_scheduled_pipelines
|
- *ignore_scheduled_pipelines
|
||||||
# Run only on pre-merge pipelines from Marge
|
# Run only on pre-merge pipelines from Marge
|
||||||
- if: '$GITLAB_USER_LOGIN != "marge-bot" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
|
- if: '$GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH'
|
||||||
when: never
|
when: never
|
||||||
- changes:
|
- changes:
|
||||||
*mesa_core_file_list
|
*mesa_core_file_list
|
||||||
|
Reference in New Issue
Block a user