aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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