summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2017-06-02 00:41:50 -0400
committerVenkata Harish K Kajur <vk250x@att.com>2017-06-05 14:23:52 -0400
commit3512f4dd30f24602fcea891c2804899984739ce3 (patch)
treef7781f4fecaf4aab89cf88a4daedd5cc01f46e0e /jjb
parent2a2f1d3c746560731814e763f39a94d302fb4bd1 (diff)
Update the jenkins job for 1.1-SNAPSHOT
Change-Id: Ib11656b83910992da290ccd1dfd75457adae614d Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/include-docker-push.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/jjb/include-docker-push.sh b/jjb/include-docker-push.sh
index 2360055be..57a0264bb 100644
--- a/jjb/include-docker-push.sh
+++ b/jjb/include-docker-push.sh
@@ -15,6 +15,7 @@ else
VERSION=1.1.0;
fi
+RELEASE_VERSION_REGEX="^[0-9]+\.[0-9]+\.[0-9]+$";
SNAPSHOT_TAG=${VERSION}-SNAPSHOT-${DATETIME_STAMP};
STAGING_TAG=${VERSION}-STAGING-${DATETIME_STAMP};
@@ -26,12 +27,10 @@ if [[ $PROJECT =~ $SEARCH ]] ; then
docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG;
docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG;
- if [ "$VERSION" == "1.0.0" ]; then
- docker tag $REPO_PATH:latest $REPO_PATH:1.0-STAGING-latest;
- docker push $REPO_PATH:1.0-STAGING-latest;
- elif [ "$VERSION" == "1.1.0" ]; then
- docker tag $REPO_PATH:latest $REPO_PATH:1.1-STAGING-latest;
- docker push $REPO_PATH:1.1-STAGING-latest;
+ if [[ "$VERSION" =~ $RELEASE_VERSION_REGEX ]]; then
+ STRIPPED_RELEASE=$(echo $VERSION | cut -d"." -f1,2);
+ docker tag $REPO_PATH:latest $REPO_PATH:${STRIPPED_RELEASE}-STAGING-latest;
+ docker push $REPO_PATH:${STRIPPED_RELEASE}-STAGING-latest;
else
docker push $REPO_PATH:latest;
fi
@@ -47,9 +46,10 @@ else
docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG;
docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG;
- if [ "$VERSION" == "1.0.0" ]; then
- docker tag $REPO_PATH:latest $REPO_PATH:1.0-STAGING-latest;
- docker push $REPO_PATH:1.0-STAGING-latest;
+ if [[ "$VERSION" =~ $RELEASE_VERSION_REGEX ]]; then
+ STRIPPED_RELEASE=$(echo $VERSION | cut -d"." -f1,2);
+ docker tag $REPO_PATH:latest $REPO_PATH:${STRIPPED_RELEASE}-STAGING-latest;
+ docker push $REPO_PATH:${STRIPPED_RELEASE}-STAGING-latest;
else
docker push $REPO_PATH:latest;
fi