update docker image tags
Change-Id: I207a68c761ccc2770ac13539595a79f5e176d611
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
diff --git a/docker_verify.sh b/docker_verify.sh
index 6501978..a115ce3 100755
--- a/docker_verify.sh
+++ b/docker_verify.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 @@
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