adding version.properties 03/2203/1
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 15 Mar 2017 20:37:14 +0000 (16:37 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Wed, 15 Mar 2017 20:37:34 +0000 (16:37 -0400)
Change-Id: I9f139bcf080d3fa79d4f067d7f0987fa304adf3f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
docker_build.sh
docker_merge.sh
docker_verify.sh
pom.xml
version.properties [new file with mode: 0644]

index 519a8a8..fa98db2 100755 (executable)
@@ -4,6 +4,7 @@ echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES ================='
 
 DOCKER_REPOSITORY=nexus3.openecomp.org:10003
 MVN_VERSION=$(cat target/version)
+MVN_VERSION="${MVN_VERSION}-STAGING"
 TIMESTAMP=$(date -u +%Y%m%dT%H%M%S)
 
 echo $DOCKER_REPOSITORY
@@ -20,8 +21,9 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p
 
     TAGS="--tag openecomp/policy/${image}:latest"
     TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:latest"
-    TAGS="${TAGS} --tag openecomp/policy/${image}:${MVN_VERSION}"
-    TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}"
+    TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-latest"
+    TAGS="${TAGS} --tag openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
+    TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
 
     echo $TAGS
 
@@ -32,5 +34,6 @@ done
 for image in policy-nexus policy-db policy-drools policy-pe; do
     echo "Pushing $image"
 #    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:latest
-    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}
+#    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-latest
+    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-${TIMESTAMP}
 done
index a115ce3..8d5eef7 100755 (executable)
@@ -20,8 +20,15 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p
 
     TAGS="--tag openecomp/policy/${image}:latest"
     TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:latest"
+    TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-latest"
     TAGS="${TAGS} --tag openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
     TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
 
     echo $TAGS
 done
+
+#for image in policy-nexus policy-db policy-drools policy-pe; do
+#    echo "Pushing $image"
+##    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-latest
+#    docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-${TIMESTAMP}
+#done
index a115ce3..a78a496 100755 (executable)
@@ -20,6 +20,7 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p
 
     TAGS="--tag openecomp/policy/${image}:latest"
     TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:latest"
+    TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-latest"
     TAGS="${TAGS} --tag openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
     TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}"
 
diff --git a/pom.xml b/pom.xml
index 9cb9a55..bed0f7a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
 
        <groupId>org.openecomp.policy.docker</groupId>
        <artifactId>docker</artifactId>
-       <version>1.0.0</version>
+       <version>1.0.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <name>Docker build</name>
        <description>OpenECOMP Policy Docker Build</description>
diff --git a/version.properties b/version.properties
new file mode 100644 (file)
index 0000000..5128787
--- /dev/null
@@ -0,0 +1,13 @@
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+major=1
+minor=0
+patch=0
+
+base_version=${major}.${minor}.${patch}
+
+# Release must be completed with git revision # in Jenkins
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT