[gnome-build-meta/abderrahim/child-pipelines] .gitlab-ci.yml: make building of VM images manual



commit 380ef8155d6f88a1dd4b748eec4ff9e900b88878
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Sun Aug 9 20:52:37 2020 +0100

    .gitlab-ci.yml: make building of VM images manual
    
    Now that the images can be updated using ostree, there is no need to
    generate images on every commit. This also allows making the
    instructions the same for all images.
    
    We'll need to build the x86_64 images once per day or so

 .gitlab-ci.yml | 94 ++++++++++++++++------------------------------------------
 1 file changed, 26 insertions(+), 68 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a78a2280..58b8ede1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -78,22 +78,18 @@ default:
     - logs
     expire_in: '1 week'
 
-.vm-image-template:
-  stage: image
+.image-manual-template:
+  stage: deploy
+  dependencies: [track]
   interruptible: true
+  when: manual
+  allow_failure: true
   script:
-    - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build vm/image.bst
-    - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks vm/image.bst image
-  rules:
-  - if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^gnome-\d-\d\d$/
-    when: on_success
-  - if: $CI_MERGE_REQUEST_ID == null
-    when: manual
-    allow_failure: true
+    - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build "${IMAGE}"
+    - ${BST} -o arch "${ARCH}" checkout --hardlinks "${IMAGE}" image
   artifacts:
     when: always
     paths:
-    - logs
     - image
     expire_in: '2 days'
 
@@ -245,70 +241,32 @@ deploy-flatpak:
 
 vm-image-x86_64:
   extends:
-  - .vm-image-template
+  - .image-manual-template
   - .x86_64
-  # run as soon as the x86_64 build job is done, don't wait for other arches
-  needs:
-  - track
-  - job: build-gnome-core-x86_64
-    artifacts: false
+  variables:
+    IMAGE: vm/image.bst
 
 pinebook-pro-image:
-  extends: .aarch64
-  stage: image
-  script:
-    - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build boards/pinebook-pro/image.bst
-    - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks boards/pinebook-pro/image.bst pinebook-pro-image
-  when: manual
-  allow_failure: true
-  artifacts:
-    when: always
-    paths:
-    - logs
-    - pinebook-pro-image
-    expire_in: '2 days'
-  needs:
-  - track
-  - job: build-gnome-core-aarch64
-    artifacts: false
+  extends:
+  - .image-manual-template
+  - .aarch64
+  variables:
+    IMAGE: boards/pinebook-pro/image.bst
 
 rock64-image:
-  extends: .aarch64
-  stage: image
-  script:
-    - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build boards/rock64/image.bst
-    - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks boards/rock64/image.bst rock64
-  when: manual
-  allow_failure: true
-  artifacts:
-    when: always
-    paths:
-    - logs
-    - rock64
-    expire_in: '2 days'
-  needs:
-  - track
-  - job: build-gnome-core-aarch64
-    artifacts: false
+  extends:
+  - .image-manual-template
+  - .aarch64
+  variables:
+    IMAGE: boards/rock64/image.bst
 
 raspberrypi-4-image:
-  extends: .aarch64
-  stage: image
-  script:
-    - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build boards/raspberrypi-4/image.bst
-    - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks boards/raspberrypi-4/image.bst 
raspberrypi-4-image
-  when: manual
-  allow_failure: true
-  artifacts:
-    when: always
-    paths:
-    - logs
-    - raspberrypi-4-image
-    expire_in: '2 days'
-  needs:
-  - track
-  - job: build-gnome-core-aarch64
-    artifacts: false
+  extends:
+  - .image-manual-template
+  - .aarch64
+  variables:
+    IMAGE: boards/raspberrypi-4/image.bst
+
 
 ostree-x86_64:
   extends:


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