[gnome-runtime-images/alatiera/f-docker-cleanups: 2/2] ci: Use CI_REGISTRY_IMAGE instead of hacks



commit 2f2418620f57d98c7bfafa74581a89a9686c68ce
Author: Jordan Petridis <jpetridis gnome org>
Date:   Tue Feb 19 16:50:31 2019 +0200

    ci: Use CI_REGISTRY_IMAGE instead of hacks
    
    This achieves the same thing, but there's a pre-defined gitlab
    variable to do it!

 .gitlab-ci.yml | 32 ++++++++------------------------
 1 file changed, 8 insertions(+), 24 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a49975..874cd38 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,54 +34,42 @@ stages:
 base:
     stage: base
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/base"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/base"
         - export DOCKERFILE=base
     <<: *build
 
 gnome:master:
     stage: runtimes
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/gnome:master"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/gnome:master"
         - export DOCKERFILE=gnome-master/Dockerfile
     <<: *build
 
 gnome:3.26:
     stage: runtimes
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/gnome:3.26"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/gnome:3.26"
         - export DOCKERFILE=gnome-3-26/Dockerfile
     <<: *build
 
 gnome:3.28:
     stage: runtimes
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/gnome:3.28"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/gnome:3.28"
         - export DOCKERFILE=gnome-3-28/Dockerfile
     <<: *build
 
 gnome:3.30:
     stage: runtimes
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/gnome:3.30"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/gnome:3.30"
         - export DOCKERFILE=gnome-3-30/Dockerfile
     <<: *build
 
 rust master:
     stage: rust_bundle
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/rust_bundle:master"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/rust_bundle:master"
         - export DOCKERFILE="sdk-bundles/rust"
 
         - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
@@ -93,9 +81,7 @@ rust master:
 rust 3.28:
     stage: rust_bundle
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/rust_bundle:3.28"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/rust_bundle:3.28"
         - export DOCKERFILE="sdk-bundles/rust"
 
         - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.28"
@@ -107,9 +93,7 @@ rust 3.28:
 rust 3.30:
     stage: rust_bundle
     before_script:
-        # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
-        - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
-        - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}/rust_bundle:3.30"
+        - export IMAGE="${CI_REGISTRY_IMAGE}/rust_bundle:3.30"
         - export DOCKERFILE="sdk-bundles/rust"
 
         - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.30"


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