From adacdc4280f0e487bde1ba3424a6fc66d4b02000 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 23 Feb 2017 03:56:16 +0000 Subject: docker naming, version, staging Change-Id: I5077d67a4c0a3ab61e1a09a39c62be6ecb081fcd Signed-off-by: Ubuntu --- pom.xml | 11 +++++++++++ script-dmaapbc-docker-build.sh | 20 ++++++++++++++++---- version.properties | 6 ++++++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 version.properties diff --git a/pom.xml b/pom.xml index 748dceb..3c7abe1 100644 --- a/pom.xml +++ b/pom.xml @@ -145,6 +145,17 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ecomp-staging + ${nexusproxy} + 176c31dfe190a + + diff --git a/script-dmaapbc-docker-build.sh b/script-dmaapbc-docker-build.sh index 5727f55..252aa5a 100755 --- a/script-dmaapbc-docker-build.sh +++ b/script-dmaapbc-docker-build.sh @@ -23,8 +23,14 @@ else fi -IMAGE='dcae_dmaapbc' -TAG='1.0.0' +IMAGE='openecomp/dcae_dmaapbc' +VERSION=$(xpath -e "//project/version/text()" "pom.xml") +EXT=$(echo "$VERSION" | rev | cut -f1 -d'-' | rev) +if [ "$EXT" == "SNAPSHOT" ]; then + VERSION=$(echo "$VERSION" | rev | cut -f2- -d'-' | rev) +fi +TIMESTAMP=$(date +%C%y%m%dT%H%M%S) +TAG="$VERSION-$TIMESTAMP" LFQI="${IMAGE}:${TAG}" BUILD_PATH="${WORKSPACE}" @@ -43,6 +49,12 @@ fi # snapshot registry nexus3.openecomp.org:10003" REPO='nexus3.openecomp.org:10003' RFQI="${REPO}/${LFQI}" -docker tag ${LFQI} ${RFQI} -docker push ${RFQI} +docker tag "${LFQI}" "${RFQI}" +docker push "${RFQI}" + +TAG="latest" +LFQI="${IMAGE}:${TAG}" +RFQI2="${REPO}/${LFQI}" +docker tag "${RFQI}" "${RFQI2}" +docker push "${RFQI2}" diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..8bc13ef --- /dev/null +++ b/version.properties @@ -0,0 +1,6 @@ +major=1 +minor=0 +patch=0 +base_version="${major}.${minor}.${patch}" +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg