[libvirt PATCH 5/5] ci: Improve CI_IMAGE_TAG handling

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

 



Since we're already building the full container image reference
dynamically at this point, we can finally get rid of the annoying
requirement to include ":" in CI_IMAGE_TAG.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 ci/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ci/Makefile b/ci/Makefile
index e1a5faaba6..96e4d62611 100644
--- a/ci/Makefile
+++ b/ci/Makefile
@@ -55,9 +55,9 @@ CI_IMAGE_REGISTRY = registry.gitlab.com
 # image instead
 CI_IMAGE_PREFIX = libvirt/libvirt/ci-
 
-# The default tag is ':latest' but if the container
+# The default tag is 'latest' but if the container
 # repo above uses different conventions this can override it
-CI_IMAGE_TAG = :latest
+CI_IMAGE_TAG = latest
 
 # We delete the virtual root after completion, set
 # to 0 if you need to keep it around for debugging
@@ -220,7 +220,10 @@ ci-run-command@%: ci-prepare-tree
 	if test "$(CI_IMAGE_REGISTRY)"; then \
 		image="$${image}$(CI_IMAGE_REGISTRY)/"; \
 	fi; \
-	image="$${image}$(CI_IMAGE_PREFIX)$*$(CI_IMAGE_TAG)"; \
+	image="$${image}$(CI_IMAGE_PREFIX)$*"; \
+	if test "$(CI_IMAGE_TAG)"; then \
+		image="$${image}:$(CI_IMAGE_TAG)"; \
+	fi; \
 	$(CI_ENGINE) run $(CI_ENGINE_ARGS) "$$image" \
 		/bin/bash -c ' \
 		$(CI_USER_HOME)/prepare || exit 1; \
-- 
2.25.4




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux