[librsvg-oci-images/alatiera/cleanups: 2/4] CI: Use 'extends:' instead of yaml anchors



commit 5502909a099288f7008ccfebd74d2fe5aa95be55
Author: Jordan Petridis <jpetridis gnome org>
Date:   Sun Dec 2 21:34:09 2018 +0200

    CI: Use 'extends:' instead of yaml anchors

 .gitlab-ci.yml | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7c1f80d..5cb2098 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,12 +14,12 @@ stages:
 # Expects $IMAGE which should be the name+tag of the registry image.
 # Expects $OCI_YML variable which should be the path to the dockerfile
 # Expects $DIR variable which should be the name of the parrent folder of the dockerfile
-.base_template: &base_build
-    script:
-        - cd ${DIR}
-        - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-        - docker build --pull -f ${OCI_YML} -t ${IMAGE} .
-        - docker push ${IMAGE}
+.base:
+  script:
+    - cd ${DIR}
+    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+    - docker build --pull -f ${OCI_YML} -t ${IMAGE} .
+    - docker push ${IMAGE}
 
 # Expects $ARCH variable which should be the architexcture of the image ex. x86_64
 # Expects $DISTRO_NAME variable which should be the name of the distro image ex. ubuntu
@@ -29,7 +29,7 @@ stages:
     stage: distro
     before_script:
         - export IMAGE=${CI_REGISTRY_IMAGE}/${ARCH}/${DISTRO_NAME}:${DISTRO_VER}
-    <<: *base_build
+    extends: '.base'
 
 # Expects $COMPILER variable which should be the name of the compiler ex. rustc/gcc
 # Expects $TAG_VERSION variable which should be the version of the compiler minus the minor release ex. 1.24
@@ -41,7 +41,7 @@ stages:
         - export OCI_YML=rustc.yml
         - export DIR=rustc/
         - sed -e "s|@RUSTC_VERSION@|$RUSTC_VERSION|" rustc/rustc_template > rustc/rustc.yml
-    <<: *base_build
+    extends: '.base'
     only:
         refs:
             - shedules


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