summaryrefslogtreecommitdiffstats
path: root/activiti-extension/src
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-10-16 18:53:39 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-10-16 18:53:39 +0800
commit614d7112b9a1420e3539503564bbb3fb35bd397a (patch)
tree2eb68ca663cee48f29bdf5428fa069f5c857650b /activiti-extension/src
parent969e3c70a50c58b00c63900f1fcb9317034ec057 (diff)
Add vfc docker build staging tag
Change-Id: Idb871436e2b74bce7d582616116c49dc7e8f351d Issue-Id: VFC-535 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'activiti-extension/src')
-rw-r--r--activiti-extension/src/main/docker/activiti-docker-build_image.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/activiti-extension/src/main/docker/activiti-docker-build_image.sh b/activiti-extension/src/main/docker/activiti-docker-build_image.sh
index 67e9e7e..f970d9e 100644
--- a/activiti-extension/src/main/docker/activiti-docker-build_image.sh
+++ b/activiti-extension/src/main/docker/activiti-docker-build_image.sh
@@ -8,11 +8,13 @@ cd ${DOCKER_BUILD_DIR}
BUILD_ARGS="--no-cache"
ORG="onap"
# VERSION="1.0.0"
-VERSION="1.0.0-SNAPSHOT"
+DOCKER_VER="1.0.0"
+VERSION="${DOCKER_VER}-SNAPSHOT"
PROJECT="vfc"
IMAGE="wfengine-activiti"
DOCKER_REPOSITORY="nexus3.onap.org:10003"
IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
+TIMESTAMP=$(date +"%Y%m%dT%H%M%S")
if [ -z $NEXUS_REPOS_URL ]; then
NEXUS_REPOS_URL="https://nexus.onap.org"
@@ -136,13 +138,23 @@ cp -Rf bin/* ./build/apache-tomcat/bin
function build_image {
echo "Start build docker image: ${IMAGE_NAME}"
- docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest ./build
+ docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest ./build
+}
+
+function push_image_tag {
+ TAG_NAME=$1
+ echo "Start push ${TAG_NAME}"
+ docker tag ${IMAGE_NAME}:latest ${TAG_NAME}
+ docker push ${TAG_NAME}
}
function push_image {
- echo "Start push docker image: ${IMAGE_NAME}"
- docker push ${IMAGE_NAME}:${VERSION}
+ echo "Start push ${IMAGE_NAME}:latest"
docker push ${IMAGE_NAME}:latest
+
+ push_image_tag ${IMAGE_NAME}:${DOCKER_VER}-SNAPSHOT-latest
+ push_image_tag ${IMAGE_NAME}:${DOCKER_VER}-STAGING-latest
+ push_image_tag ${IMAGE_NAME}:${DOCKER_VER}-STAGING-${TIMESTAMP}
}
build_image