diff options
Diffstat (limited to 'wfenginemgrservice/src/main')
-rw-r--r-- | wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh b/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh index 3cb0918..b4cdc47 100644 --- a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh +++ b/wfenginemgrservice/src/main/docker/wfenginemgrservice-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-mgrservice" 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" @@ -79,13 +81,23 @@ mv workflow-engine-mgr-service*.jar ./bin/workflow-engine-mgr-service.jar function build_image { echo "Start build docker image: ${IMAGE_NAME}" - docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest . + docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest . +} + +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 |