[mutter/alatiera/workflow-rules] wip: migrate to rules to avoid double pipelines
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [mutter/alatiera/workflow-rules] wip: migrate to rules to avoid double pipelines
- Date: Thu, 19 Nov 2020 16:07:54 +0000 (UTC)
commit 1a1246927d5e2b05ef61bed89cd09cb29a6d8646
Author: Jordan Petridis <jpetridis gnome org>
Date:   Thu Nov 19 16:59:01 2020 +0200
    wip: migrate to rules to avoid double pipelines
 .gitlab-ci.yml | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2a424c75d..77466530e3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,10 +30,19 @@ stages:
 
       dnf clean all
 
+workflow:
+  rules:
+    - if: '$CI_MERGE_REQUEST_IID'
+    - if: '$CI_COMMIT_TAG'
+    - if: '$CI_COMMIT_BRANCH'
+
 .only_default: &only_default
-  only:
-      - merge_requests
-      - /^.*$/
+  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'
 
 build-fedora-container:
   extends:
@@ -65,7 +74,7 @@ build-mutter:
     - .fdo.distribution-image@fedora
     - .mutter.fedora:33
   stage: build
-  needs: ["check-commit-log"]
+  needs: ["check-commit-log", 'build-fedora-container']
   script:
     - meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true 
--werror --prefix /usr
     - ninja -C build
@@ -74,7 +83,6 @@ build-mutter:
     expire_in: 1 day
     paths:
       - build
-  <<: *only_default
 
 build-without-opengl-and-glx:
   extends:
@@ -89,7 +97,6 @@ build-without-opengl-and-glx:
   artifacts:
     paths:
       - build/meson-logs
-  <<: *only_default
 
 build-without-native-backend-and-wayland:
   extends:
@@ -104,7 +111,6 @@ build-without-native-backend-and-wayland:
   artifacts:
     paths:
       - build/meson-logs
-  <<: *only_default
 
 test-mutter:
   extends:
@@ -130,7 +136,6 @@ test-mutter:
     when: always
     paths:
       - build
-  <<: *only_default
 
 test-mutter-coverage:
   extends:
@@ -147,7 +152,6 @@ test-mutter-coverage:
     paths:
       - build/meson-logs/coveragereport
   coverage: '/^TOTAL.*\s+(\d+\%)$/'
-  <<: *only_default
 
 can-build-gnome-shell:
   extends:
@@ -163,4 +167,3 @@ can-build-gnome-shell:
     - .gitlab-ci/checkout-gnome-shell.sh
     - meson gnome-shell gnome-shell/build --prefix /usr -Dman=false
     - ninja -C gnome-shell/build install
-  <<: *only_default
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]