diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-06-06 18:40:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-06-06 18:40:38 +0000 |
commit | 6b79a2ca4096fdaf7098e844ada99e17254ce7fc (patch) | |
tree | f48c56c90ad20e2811d685894a28e4587bb81814 | |
parent | 98a82bd6763343644130e6a8a2aa70ba4a12533a (diff) | |
parent | 3512f4dd30f24602fcea891c2804899984739ce3 (diff) |
Merge "Update the jenkins job for 1.1-SNAPSHOT"
-rw-r--r-- | jjb/include-docker-push.sh | 18 |
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 |