diff options
Diffstat (limited to 'docker_merge.sh')
-rwxr-xr-x | docker_merge.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/docker_merge.sh b/docker_merge.sh index 65019782..a115ce39 100755 --- a/docker_merge.sh +++ b/docker_merge.sh @@ -3,10 +3,12 @@ echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES =================' DOCKER_REPOSITORY=nexus3.openecomp.org:10003 -DOCKER_VERSION=latest +MVN_VERSION=$(cat target/version) +TIMESTAMP=$(date -u +%Y%m%dT%H%M%S) -export DOCKER_REPOSITORY -export DOCKER_VERSION +echo $DOCKER_REPOSITORY +echo $MVN_VERSION +echo $TIMESTAMP cp policy-pe/* target/policy-pe/ cp policy-drools/* target/policy-drools/ @@ -15,6 +17,11 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p echo "Building $image" mkdir -p target/$image cp $image/* target/$image - docker build --quiet --tag openecomp/policy/$image:${DOCKER_VERSION} --tag ${DOCKER_REPOSITORY}/openecomp/policy/$image:${DOCKER_VERSION} target/$image - docker images + + TAGS="--tag openecomp/policy/${image}:latest" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:latest" + TAGS="${TAGS} --tag openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" + + echo $TAGS done |