gitlab CI: use multiple extends over anchors for the upstream pull
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 27 Nov 2019 21:51:16 +0000 (07:51 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 28 Nov 2019 05:00:26 +0000 (05:00 +0000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml

index 3b2a74c31f7ce59194947ee9ad9df282a54d6f76..ce9435fbd5d4a3914f03ab75ed5e8e7c947e3f26 100644 (file)
@@ -140,7 +140,7 @@ variables:
 # is too old or if it is missing some dependencies.
 #
 
-.pull_upstream_or_rebuild: &pull_upstream_or_rebuild
+.pull_upstream_or_rebuild:
   before_script:
     # log in to the registry
     - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
@@ -161,6 +161,7 @@ fedora:30@qemu-prep:
   extends:
     - .fedora@qemu-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   tags:
     - kvm
@@ -173,12 +174,12 @@ fedora:30@qemu-prep:
     DISTRIB_VERSION: $FEDORA_VERSION
     TAG: $QEMU_TAG
   allow_failure: true
-  <<: *pull_upstream_or_rebuild
 
 fedora:30@container-prep:
   extends:
     - .fedora@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -186,12 +187,12 @@ fedora:30@container-prep:
     DISTRIB_FLAVOR: fedora
     DISTRIB_VERSION: $FEDORA_VERSION
     TAG: $FEDORA_TAG
-  <<: *pull_upstream_or_rebuild
 
 fedora:31@container-prep:
   extends:
     - .fedora@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -199,13 +200,13 @@ fedora:31@container-prep:
     DISTRIB_FLAVOR: fedora
     DISTRIB_VERSION: $FEDORA_VERSION
     TAG: $FEDORA_TAG
-  <<: *pull_upstream_or_rebuild
 
 
 ubuntu:19.10@container-prep:
   extends:
     - .ubuntu@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -213,12 +214,12 @@ ubuntu:19.10@container-prep:
     DISTRIB_FLAVOR: ubuntu
     DISTRIB_VERSION: $UBUNTU_VERSION
     TAG: $UBUNTU_TAG
-  <<: *pull_upstream_or_rebuild
 
 ubuntu:19.04@container-prep:
   extends:
     - .ubuntu@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -226,13 +227,13 @@ ubuntu:19.04@container-prep:
     DISTRIB_FLAVOR: ubuntu
     DISTRIB_VERSION: $UBUNTU_VERSION
     TAG: $UBUNTU_TAG
-  <<: *pull_upstream_or_rebuild
 
 
 arch:rolling@container-prep:
   extends:
     - .arch@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -240,12 +241,12 @@ arch:rolling@container-prep:
     DISTRIB_FLAVOR: archlinux
     DISTRIB_VERSION: $ARCH_VERSION
     TAG: $ARCH_TAG
-  <<: *pull_upstream_or_rebuild
 
 alpine:latest@container-prep:
   extends:
     - .alpine@container-build
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   variables:
     GIT_STRATEGY: none
@@ -253,14 +254,13 @@ alpine:latest@container-prep:
     DISTRIB_FLAVOR: alpine
     DISTRIB_VERSION: $ALPINE_VERSION
     TAG: $ALPINE_TAG
-  <<: *pull_upstream_or_rebuild
 
 .freebsd@container-prep:
   extends:
     - .policy
+    - .pull_upstream_or_rebuild
   stage: container_prep
   image: $BUILDAH_IMAGE
-  <<: *pull_upstream_or_rebuild
   script:
     - export BUILDAH_RUN="buildah run --isolation chroot"
     - export BUILDAH_COMMIT="buildah commit --format docker"