[gnome-build-meta/abderrahim/gitlab-ci-rules: 2/2] .gitlab-ci.yml: use an anchor to avoid repeating the flatpak publish rules



commit bef918cb0f7bd0555bfc4cd741c65f0b99aa0c1c
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Thu Oct 3 20:20:23 2019 +0100

    .gitlab-ci.yml: use an anchor to avoid repeating the flatpak publish rules

 .gitlab-ci.yml | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1e395bfe..6f85bd0c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -151,7 +151,7 @@ default:
   - flatpak build-update-repo --generate-static-deltas repo/
 
   - flat-manager/flat-manager-client push $(cat build.txt) repo/
-  rules:
+  rules: &flatpak-publish-rules
   - if: $EMERGENCY || $BST_TRACK_TAGS != "False"
     when: never
   - if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME ~= /^gnome-\d-\d\d$/
@@ -236,10 +236,7 @@ flatpak-prepare:
   artifacts:
     paths:
     - build.txt
-  rules:
-  - if: $EMERGENCY || $BST_TRACK_TAGS != "False"
-    when: never
-  - if: $CI_COMMIT_REF_NAME == 'master' || $CI_COMMIT_REF_NAME ~= /^gnome-\d-\d\d$/
+  rules: *flatpak-publish-rules
   <<: *x86_64
 
 
@@ -267,10 +264,7 @@ flatpak-finish:
   - flat-manager/flat-manager-client commit --wait $(cat build.txt)
   - flat-manager/flat-manager-client publish --wait $(cat build.txt)
   - flat-manager/flat-manager-client purge $(cat build.txt)
-  rules:
-  - if: $EMERGENCY || $BST_TRACK_TAGS != "False"
-    when: never
-  - if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME ~= /^gnome-\d-\d\d$/
+  rules: *flatpak-publish-rules
   <<: *x86_64
 
 flatpak-finish-failed:
@@ -279,10 +273,7 @@ flatpak-finish-failed:
   script:
   - flat-manager/flat-manager-client purge $(cat build.txt)
   when: on_failure
-  rules:
-  - if: $EMERGENCY || $BST_TRACK_TAGS != "False"
-    when: never
-  - if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME ~= /^gnome-\d-\d\d$/
+  rules: *flatpak-publish-rules
   <<: *x86_64
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]