Update tag in build_image.sh
[vfc/nfvo/driver/vnfm/svnfm.git] / nokia / vnfmdriver / vfcadaptorservice / docker / build_image.sh
index bed2a3b..65e2ac9 100755 (executable)
@@ -37,20 +37,20 @@ if [ $HTTPS_PROXY ]; then
 fi
 
 function build_image {
-    echo "Start build docker image: ${IMAGE_NAME}"
-    docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest .
+    echo "Start build docker image: ${IMAGE_NAME}:${VERSION}-latest"
+    docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION}-latest .
 }
 
 function push_image_tag {
     TAG_NAME=$1
     echo "Start push ${TAG_NAME}"
-    docker tag ${IMAGE_NAME}:latest ${TAG_NAME}
+    docker tag ${IMAGE_NAME}:${VERSION}-latest ${TAG_NAME}
     docker push ${TAG_NAME}
 }
 
 function push_image {
-    echo "Start push ${IMAGE_NAME}:latest"
-    docker push ${IMAGE_NAME}:latest
+    echo "Start push ${IMAGE_NAME}:${VERSION}-latest"
+    docker push ${IMAGE_NAME}:${VERSION}-latest
     
     push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest
     push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest