aboutsummaryrefslogtreecommitdiffstats
path: root/build4docker.sh
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-11-16 10:16:34 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-11-16 10:16:40 +0800
commit567a23d19f3d0a116cc3b5e7014f506c692855e8 (patch)
tree66c849317a1185ebaad3a1491e5151efdfc7cbea /build4docker.sh
parent9b3c0b01331e4b9b90f9bc491f56bc2c444cde32 (diff)
Update Kube2MSB image to Amsterdam release version
Issue-Id: MSB-95 Change-Id: I1673c7b105c0a0cd60299b41bc50b801b8ee101b Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'build4docker.sh')
-rw-r--r--build4docker.sh32
1 files changed, 25 insertions, 7 deletions
diff --git a/build4docker.sh b/build4docker.sh
index c316146..f112b5d 100644
--- a/build4docker.sh
+++ b/build4docker.sh
@@ -27,13 +27,13 @@ RELEASE_BASE_DIR=$RUNHOME/release
RELEASE_DIR=${RELEASE_BASE_DIR}/registrator
DOCKER_RUN_NAME=kube2msb
DOCKER_IMAGE_NAME=kube2msb
-DOCKER_RELEASE_VERSION=latest
+DOCKER_LATEST_VERSION=latest
+DOCKER_RELEASE_VERSION=1.0.0
DOCKER_REPOSITORY=nexus3.onap.org:10003
rm -rf $RELEASE_DIR
mkdir $RELEASE_DIR -p
-
cp -r $RUNHOME/target/* ${RELEASE_DIR}
cp $RUNHOME/build/docker/* ${RELEASE_DIR}
#build docker image
@@ -41,15 +41,33 @@ cd ${RELEASE_DIR}
chmod 777 build_docker_image.sh
docker rm -f ${DOCKER_RUN_NAME}
-docker rmi ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}
+docker rmi ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION}
+docker rmi ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-latest
+docker rmi ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-latest
-./build_docker_image.sh -n=${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME} -v=${DOCKER_RELEASE_VERSION} -d=./docker
+./build_docker_image.sh -n=${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME} -v=${DOCKER_LATEST_VERSION} -d=./docker
#docker run
-docker run -d --net=host --name ${DOCKER_RUN_NAME} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}
+docker run -d --net=host --name ${DOCKER_RUN_NAME} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION}
docker ps |grep ${DOCKER_RUN_NAME}
-echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}"
-docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}
+echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION}"
+docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION}
+
+echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-latest"
+docker tag ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-latest
+docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-latest
+
+echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-${TIMESTAMP}"
+docker tag ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-${TIMESTAMP}
+docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-STAGING-${TIMESTAMP}
+
+echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-latest"
+docker tag ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-latest
+docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-latest
+
+echo "Pushing ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-${TIMESTAMP}"
+docker tag ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_LATEST_VERSION} ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-${TIMESTAMP}
+docker push ${DOCKER_REPOSITORY}/onap/oom/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}-SNAPSHOT-${TIMESTAMP} \ No newline at end of file