From 0e30ffe4da977e5e2966f02f385911e487061d64 Mon Sep 17 00:00:00 2001 From: Shilong Liu Date: Mon, 9 May 2022 16:43:21 +0800 Subject: [PATCH] [ci] Support multi tags when pushing docker image (#10771) --- push_docker.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/push_docker.sh b/push_docker.sh index 3e2da08d0b..131494be29 100755 --- a/push_docker.sh +++ b/push_docker.sh @@ -54,9 +54,10 @@ docker login -u ${REGISTRY_USERNAME} -p "${REGISTRY_PASSWD}" ${REGISTRY_SERVER_W docker_image_name=$(basename ${DOCKER_IMAGE_FILE} | cut -d. -f1) remote_image_name=${REGISTRY_SERVER_WITH_PORT}/${docker_image_name} -[ -z "${DOCKER_IMAGE_TAG}" ] || { - push_it ${docker_image_name} ${remote_image_name}:${DOCKER_IMAGE_TAG} -} +for tag in ${DOCKER_IMAGE_TAG} +do + push_it ${docker_image_name} ${remote_image_name}:$tag +done if [ -n "${sonic_version}" ] && [ -n "${sonic_platform}" ] then