gitlab-ci: Move the image definition to the template
authorAndreas Schneider <asn@samba.org>
Tue, 20 Nov 2018 07:15:02 +0000 (08:15 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 26 Jan 2019 18:08:12 +0000 (19:08 +0100)
And in addition use variables for defining project and build env.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
.gitlab-ci.yml

index 04d57cb0491688fe34d96cb434a86b3b24411197..5379d00750f2d562b76b96b13fb902cc2f901e6a 100644 (file)
@@ -1,8 +1,9 @@
 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
 
-image: registry.gitlab.com/samba-team/samba:latest
 
 variables:
+  SAMBA_BUILD_IMAGES_PROJECT: samba-team/samba
+  SAMBA_BUILD: latest
   GIT_STRATEGY: fetch
   GIT_DEPTH: "3"
 
@@ -18,6 +19,7 @@ after_script:
   - tar -xf logs.tar.gz system-info.txt -O
 
 .shared_template: &shared_template
+  image: $CI_REGISTRY/$SAMBA_BUILD_IMAGES_PROJECT:$SAMBA_BUILD
   stage: build
   tags:
     - docker