[gnome-runtime-images/alatiera/split-jobs] ci: rebuild the rust images in a seperate job



commit ac0fb782cd40366c6ba64eff2e9918f69a63d8e6
Author: Jordan Petridis <jpetridis gnome org>
Date:   Sun Apr 26 11:04:48 2020 +0300

    ci: rebuild the rust images in a seperate job
    
    For some god damn reason, if we are pushing 2 images from the same
    job, gitlab registry only updates the last one pushed
    Currently the gnome images haven't been getting updated in 2weeks
    while the rust ones are fine and fresh
    
    I don't have the patience to debug gitlab further, so lets workaround
    this.

 .gitlab-ci.yml | 123 ++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 78 insertions(+), 45 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82bd23f..25dcf95 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -77,7 +77,14 @@ flat-manager-client:
 
           buildah commit $CONTAINER ${CI_REGISTRY_IMAGE}/gnome:${BRANCH}
 
+        # push only on master branch
+        - |
+          if [ $CI_COMMIT_REF_NAME == master ]; then
+              buildah push ${CI_REGISTRY_IMAGE}/gnome:${BRANCH}
+          fi
 
+.rust_template:
+    script:
         # build the rust_bundle image
         - |
           CONTAINER=$(buildah from ${CI_REGISTRY_IMAGE}/gnome:${BRANCH})
@@ -90,57 +97,83 @@ flat-manager-client:
         # push only on master branch
         - |
           if [ $CI_COMMIT_REF_NAME == master ]; then
-              buildah push ${CI_REGISTRY_IMAGE}/gnome:${BRANCH}
               buildah push ${CI_REGISTRY_IMAGE}/rust_bundle:${BRANCH}
           fi
 
-
-gnome:master:
-    stage: runtimes
-    extends: .sdk_template
-    variables:
-        BRANCH: master
-        FD_BRANCH: "19.08"
-    rules:
-      - if: "$CI_MERGE_REQUEST_ID"
-        when: 'always'
-      - if: "$CI_COMMIT_BRANCH == 'master'"
-        when: 'always'
-      - when: 'manual'
-        allow_failure: true
+.vars_nightly:
+  variables:
+    BRANCH: master
+    FD_BRANCH: "19.08"
+  rules:
+    - if: "$CI_MERGE_REQUEST_ID"
+      when: 'always'
+    - if: "$CI_COMMIT_BRANCH == 'master'"
+      when: 'always'
+    - when: 'manual'
+      allow_failure: true
+
+.vars_3_32:
+  variables:
+    BRANCH: "3.32"
+    FD_BRANCH: "18.08"
+  rules:
+    - if: '$REBUILD_3_32'
+      when: 'always'
+    - when: 'manual'
+      allow_failure: true
+
+.vars_3_34:
+  variables:
+    BRANCH: "3.34"
+    FD_BRANCH: "19.08"
+  rules:
+    - if: '$REBUILD_3_34'
+      when: 'always'
+    - when: 'manual'
+      allow_failure: true
+
+.vars_3_36:
+  variables:
+    BRANCH: "3.36"
+    FD_BRANCH: "19.08"
+  rules:
+    - if: '$REBUILD_3_36'
+      when: 'always'
+    - when: 'manual'
+      allow_failure: true
+
+gnome:nightly:
+  stage: runtimes
+  extends: ['.sdk_template', '.vars_nightly']
 
 gnome:3.32:
-    stage: runtimes
-    extends: .sdk_template
-    variables:
-        BRANCH: "3.32"
-        FD_BRANCH: "18.08"
-    rules:
-      - if: '$REBUILD_3_32'
-        when: 'always'
-      - when: 'manual'
-        allow_failure: true
+  stage: runtimes
+  extends: ['.sdk_template', '.vars_3_32']
 
 gnome:3.34:
-    stage: runtimes
-    extends: .sdk_template
-    variables:
-        BRANCH: "3.34"
-        FD_BRANCH: "19.08"
-    rules:
-      - if: '$REBUILD_3_34'
-        when: 'always'
-      - when: 'manual'
-        allow_failure: true
+  stage: runtimes
+  extends: ['.sdk_template', '.vars_3_34']
 
 gnome:3.36:
-    stage: runtimes
-    extends: .sdk_template
-    variables:
-        BRANCH: "3.36"
-        FD_BRANCH: "19.08"
-    rules:
-      - if: '$REBUILD_3_36'
-        when: 'always'
-      - when: 'manual'
-        allow_failure: true
+  stage: runtimes
+  extends: ['.sdk_template', '.vars_3_36']
+
+rust:nightly:
+  stage: 'rust_bundle'
+  needs: 'gnome:nightly'
+  extends: ['.rust_template', '.vars_nightly']
+
+rust:3.32:
+  stage: 'rust_bundle'
+  needs: ['gnome:3.32']
+  extends: ['.rust_template', '.vars_3_32']
+
+rust:3.34:
+  stage: 'rust_bundle'
+  needs: ['gnome:3.34']
+  extends: ['.rust_template', '.vars_3_34']
+
+rust:3.36:
+  stage: 'rust_bundle'
+  needs: ['gnome:3.36']
+  extends: ['.rust_template', '.vars_3_36']


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