diff options
author | Lusheng Ji <lji@research.att.com> | 2017-09-06 01:44:25 +0000 |
---|---|---|
committer | Lusheng Ji <lji@research.att.com> | 2017-09-06 01:44:35 +0000 |
commit | 65e5e70e99332c168578b468d43a650b055b8b19 (patch) | |
tree | 206e63a3fc882f968ff5280e3715d92a8067c111 | |
parent | c2a234c0bb0064091d4374e68bf07cf117379263 (diff) |
Fix which docker to push
Issue-Id: DCAEGEN2-60
Change-Id: Id6aca98cc576dd19a04a520694cb3d9b5082ad93
Signed-off-by: Lusheng Ji <lji@research.att.com>
-rwxr-xr-x | mvn-phase-script.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index d994a2e..9ca53de 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -146,7 +146,9 @@ fi if [ $MVN_DEPLOYMENT_TYPE == "SNAPSHOT" ]; then REPO=$MVN_DOCKERREGISTRY_DAILY elif [ $MVN_DEPLOYMENT_TYPE == "STAGING" ]; then - REPO=$MVN_DOCKERREGISTRY_RELEASE + # there seems to be no staging docker registry? set to use SNAPSHOT also + #REPO=$MVN_DOCKERREGISTRY_RELEASE + REPO=$MVN_DOCKERREGISTRY_DAILY else echo "Fail to determine DEPLOYMENT_TYPE" REPO=$MVN_DOCKERREGISTRY_DAILY @@ -166,6 +168,18 @@ fi echo docker login "$REPO" -u "$USER" -p "$PASS_PROVIDED" docker login "$REPO" -u "$USER" -p "$PASS" + + if [ $MVN_DEPLOYMENT_TYPE == "SNAPSHOT" ]; then + REPO="$REPO/SNAPSHOTS" + elif [ $MVN_DEPLOYMENT_TYPE == "STAGING" ]; then + # there seems to be no staging docker registry? set to use SNAPSHOT also + #REPO=$MVN_DOCKERREGISTRY_RELEASE + REPO="$REPO" + else + echo "Fail to determine DEPLOYMENT_TYPE" + REPO="$REPO/UNKNOWN" + fi + OLDTAG="${LFQI}" PUSHTAGS="${REPO}/${IMAGENAME}:${VERSION2}-${TIMESTAMP} ${REPO}/${IMAGENAME}:${VERSION2} ${REPO}/${IMAGENAME}:${VERSION2}-latest" for NEWTAG in ${PUSHTAGS} |