diff options
Diffstat (limited to 'activiti-extension/src')
-rw-r--r-- | activiti-extension/src/main/docker/activiti-docker-build_image.sh | 20 |
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 |