From 35cb257a2ec44630688627c3e16af194e07fb373 Mon Sep 17 00:00:00 2001 From: Lusheng Date: Thu, 9 Mar 2017 04:22:55 +0000 Subject: docker versioning Change-Id: I318b5f54c1b4130aafb3cd2e0650ca3ee9a59f9b Signed-off-by: Lusheng --- script-dmaapbc-docker-build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/script-dmaapbc-docker-build.sh b/script-dmaapbc-docker-build.sh index 252aa5a..3fb684d 100755 --- a/script-dmaapbc-docker-build.sh +++ b/script-dmaapbc-docker-build.sh @@ -25,9 +25,9 @@ fi 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) +EXT=$(echo "$VERSION" | rev | cut -s -f1 -d'-' | rev) +if [ -z "$EXT" ]; then + VERSION=$(echo "${VERSION}-STAGING") fi TIMESTAMP=$(date +%C%y%m%dT%H%M%S) TAG="$VERSION-$TIMESTAMP" @@ -49,12 +49,16 @@ fi # snapshot registry nexus3.openecomp.org:10003" REPO='nexus3.openecomp.org:10003' RFQI="${REPO}/${LFQI}" +echo "$LFQI" +echo "$RFQI" docker tag "${LFQI}" "${RFQI}" docker push "${RFQI}" -TAG="latest" +TAG="LATEST" LFQI="${IMAGE}:${TAG}" RFQI2="${REPO}/${LFQI}" -docker tag "${RFQI}" "${RFQI2}" +echo "$LFQI" +echo "$RFQI2" +docker tag "${LFQI}" "${RFQI2}" docker push "${RFQI2}" -- cgit 1.2.3-korg