aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLusheng <lji@research.att.com>2017-03-09 04:22:55 +0000
committerLusheng <lji@research.att.com>2017-03-09 04:22:55 +0000
commit35cb257a2ec44630688627c3e16af194e07fb373 (patch)
tree972f8a0d8ba5cc051589e7b33ff2a2d2c8e60784
parentadacdc4280f0e487bde1ba3424a6fc66d4b02000 (diff)
docker versioning
Change-Id: I318b5f54c1b4130aafb3cd2e0650ca3ee9a59f9b Signed-off-by: Lusheng <lji@research.att.com>
-rwxr-xr-xscript-dmaapbc-docker-build.sh14
1 files 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}"