aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2020-06-29 11:33:13 +0200
committerMichel Dänzer <[email protected]>2020-07-01 12:44:41 +0200
commit549b4a3dd4abab86f470a13fdd9598e0d6d4776b (patch)
tree6852cbf853c2e7b51ba6ef504bf3a30f657abbdc /.gitlab-ci.yml
parent8456ff75b39839f793a7226d00746ee7ba2e713a (diff)
gitlab-ci: Automatically run pipelines for Marge Bot pre-merge only
Marge only merges an MR if the pipeline passed. Running the pipeline again after merging is redundant. v2: * Add rule to ensure docker images are up to date in the main project registry (Eric Anholt) Reviewed-by: Eric Anholt <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5680>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml21
1 files changed, 14 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 04fbe6c0051..efb4972b3ff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -118,20 +118,27 @@ success:
extends:
- .ci-run-policy
rules:
+ # Run pipeline by default in the main project if any CI pipeline
+ # configuration files were changed, to ensure docker images are up to date
+ - if: '$CI_PROJECT_PATH == "mesa/mesa"'
+ changes:
+ - .gitlab-ci.yml
+ - .gitlab-ci/**/*
+ when: on_success
# Run pipeline by default if it was triggered by Marge Bot, is for a
- # merge request, and any files affecting it were changed
- - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+ # merge request, and any files affecting the pipeline were changed
+ - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
changes:
*all_paths
when: on_success
- # Run pipeline by default in the main project if any files affecting it were
- # changed
- - if: '$CI_PROJECT_PATH == "mesa/mesa"'
+ # Run pipeline by default in the main project if it was not triggered by
+ # Marge Bot, and any files affecting the pipeline were changed
+ - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
changes:
*all_paths
when: on_success
- # Allow triggering jobs manually for MRs or branches of forked projects if
- # any files affecting the pipeline were changed
+ # Allow triggering jobs manually in other cases if any files affecting the
+ # pipeline were changed
- changes:
*all_paths
when: manual