summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-03-15 16:12:02 -0400
committerPamela Dragosh <pdragosh@research.att.com>2017-03-15 16:12:17 -0400
commit2fc2222ac3d420c93f6ce49bc0f3951e822d5342 (patch)
tree92bc814239a850f16b1fa01cc7c45555604a3f30
parent490a3705db001e2d5c022606eee71acd35d20ef5 (diff)
need version.properties
Change-Id: I0df86bbb80535584a89e46c8b4cfddca18d2c3bd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rwxr-xr-xdocker_build.sh3
-rwxr-xr-xdocker_merge.sh7
-rwxr-xr-xdocker_verify.sh1
-rw-r--r--version.properties13
4 files changed, 24 insertions, 0 deletions
diff --git a/docker_build.sh b/docker_build.sh
index 51a6bb1d..f4cf2f4d 100755
--- a/docker_build.sh
+++ b/docker_build.sh
@@ -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,6 +21,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}"
@@ -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}-latest
docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-${TIMESTAMP}
done
diff --git a/docker_merge.sh b/docker_merge.sh
index a115ce39..8d5eef7d 100755
--- a/docker_merge.sh
+++ b/docker_merge.sh
@@ -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
diff --git a/docker_verify.sh b/docker_verify.sh
index a115ce39..a78a4967 100755
--- a/docker_verify.sh
+++ b/docker_verify.sh
@@ -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/version.properties b/version.properties
new file mode 100644
index 00000000..7f86aa15
--- /dev/null
+++ b/version.properties
@@ -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=1
+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