[mutter/alatiera/duplicate-pipelines] ci: Avoid duplicate pipelines vol 2
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/alatiera/duplicate-pipelines] ci: Avoid duplicate pipelines vol 2
- Date: Tue, 26 Jul 2022 20:42:03 +0000 (UTC)
commit cac07011a7d1337e28207e52c9cfb2c5fd8c91e6
Author: Jordan Petridis <jordan centricular com>
Date: Tue Jul 26 22:36:22 2022 +0300
ci: Avoid duplicate pipelines vol 2
test
.gitlab-ci.yml | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fb69706068..267154ff3e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -131,17 +131,22 @@ default:
workflow:
rules:
- - if: '$CI_MERGE_REQUEST_IID'
- - if: '$CI_COMMIT_TAG'
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
+ when: never
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+ when: never
- if: '$CI_COMMIT_BRANCH'
+ - if: '$CI_COMMIT_TAG'
-.pipline-guard: &pipline-guard
+.pipline-guard:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^gnome-[0-9-]+$/'
- - when: 'manual'
+ - if: '$CI_COMMIT_BRANCH'
+ when: 'manual'
check-commit-log:
extends:
@@ -162,7 +167,8 @@ check-commit-log:
- commit-message-junit-report.xml
reports:
junit: commit-message-junit-report.xml
- <<: *pipline-guard
+ rules:
+ - !reference [.pipline-guard, rules]
check-merge-request:
extends:
@@ -183,7 +189,8 @@ check-merge-request:
- check-merge-request-report.xml
reports:
junit: check-merge-request-report.xml
- <<: *pipline-guard
+ rules:
+ - !reference [.pipline-guard, rules]
build-fedora-container@x86_64:
extends:
@@ -432,7 +439,8 @@ test-mutter-coverity:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $MUTTER_SCHEDULED_JOB == "coverity"'
when: always
- - when: manual
+ - if: '$CI_COMMIT_BRANCH'
+ when: 'manual'
extends:
- .fdo.distribution-image@fedora
- .mutter.fedora:35@x86_64
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]