From 8445d287cef6d63a7ac0c683ccd9a5fe59d0205c Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Sun, 7 Dec 2025 15:42:25 +0100 Subject: [PATCH] Publish unique docker snapshots - also publish a docker tag that is unique by including the timestamp - this allows testing specific snapshots of a version to be released Issue-ID: MULTICLOUD-1534 Change-Id: I688873c744964a545d21e8f07016154d603c914d Signed-off-by: Fiete Ostkamp --- deployments/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deployments/build.sh b/deployments/build.sh index 2f3c97bd..4f6c2648 100755 --- a/deployments/build.sh +++ b/deployments/build.sh @@ -57,12 +57,18 @@ function _build_docker { } function _push_image { + local timestamp=$(date -u +%Y%m%dT%H%M%SZ) local tag_name=${IMAGE_NAME}:${1:-latest} + local tag_name_with_timestamp=${tag_name}-${timestamp} - echo "Start push {$tag_name}" - docker push ${IMAGE_NAME}:latest + echo "Pushing ${tag_name}" docker tag ${IMAGE_NAME}:latest ${tag_name} docker push ${tag_name} + + docker tag ${IMAGE_NAME}:latest ${tag_name_with_timestamp} + + echo "Pushing ${tag_name_with_timestamp}" + docker push ${tag_name_with_timestamp} } if [[ -n "${JENKINS_HOME+x}" ]]; then -- 2.16.6