From 76ddfca90d99e9a1dc8aabf603259f6326ac910a Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Wed, 23 Nov 2016 02:12:29 +0000 Subject: [PATCH] Tag docker image before pushed to registry --- build_docker.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build_docker.sh b/build_docker.sh index 67c21ba4d6ce..a7b6c0511801 100755 --- a/build_docker.sh +++ b/build_docker.sh @@ -9,11 +9,13 @@ set -e usage() { cat >&2 <&2 usage @@ -62,7 +68,7 @@ REGISTRY_PASSWD=$5 BUILD_NUMBER="0" } -remote_image_name=$REGISTRY_SERVER:$REGISTRY_PORT/$docker_image_name:latest +remote_image_name=$REGISTRY_SERVER:$REGISTRY_PORT/$docker_image_name:$docker_image_tag timestamp="$(date -u +%Y%m%d)" build_version="${timestamp}.${BUILD_NUMBER}" build_remote_image_name=$REGISTRY_SERVER:$REGISTRY_PORT/$docker_image_name:$build_version