.gitlab-ci.yml: Allow overriding the default image using a variable
authorSamuel Cabrero <scabrero@suse.de>
Thu, 25 Apr 2019 11:12:42 +0000 (13:12 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 30 Apr 2019 23:18:26 +0000 (23:18 +0000)
This way one can run all tests in a different container without having
to modify the gitlab ci file, just setting the SAMBA_CI_CONTAINER_IMAGE
variable in the gitlab's GUI.

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

index 86fd2fb2778afe828404550b1795b5d83644aecf..5401a9e27b93f67b281ba06b1a62b5de03e65bc4 100644 (file)
@@ -20,6 +20,9 @@ variables:
   # which is generated by bootstrap/template.py --render
   #
   SAMBA_CI_CONTAINER_TAG: 4cc4709edd40e4e7c64f9eb255f953eed7924b1f
+  # We use the ubuntu1804 image as default as
+  # it matches what we have on sn-devel-184.
+  SAMBA_CI_CONTAINER_IMAGE: ubuntu1804
   #
   # The following images are available
   # Please see the samba-o3 sections at the end of this file!
@@ -39,9 +42,7 @@ include:
 .shared_template:
   variables:
     AUTOBUILD_JOB_NAME: $CI_JOB_NAME
-  # We use the ubuntu1804 image as default as
-  # it matches what we have on sn-devel-184.
-  image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1804
+  image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
   stage: build
   tags:
     - docker