diff options
author | Jun Li <matthew.lijun@huawei.com> | 2017-05-03 08:48:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-03 08:48:38 +0000 |
commit | 5a2e5ed064cd98daafac512febc4dab36f67c656 (patch) | |
tree | 1222972ad727314e23adea30264fce80bf66d6ef | |
parent | 0f836439dcadba052b1c7e6751f4346ac256a2f1 (diff) | |
parent | 90d4ee822d7915ee53997c099f24146a7ba4613c (diff) |
Merge "dovetail: docker tag support"
-rw-r--r-- | jjb/releng/opnfv-docker.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index 5d73a9d70..2aa52adc5 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -75,14 +75,11 @@ echo "Current branch: $BRANCH" if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" +elif [[ -n "${RELEASE_VERSION-}" ]]; then + DOCKER_TAG=${BRANCH##*/}.${RELEASE_VERSION} + # e.g. danube.1.0, danube.2.0, danube.3.0 else - if [[ -n "${RELEASE_VERSION-}" ]]; then - release=${BRANCH##*/} - DOCKER_TAG=${release}.${RELEASE_VERSION} - # e.g. colorado.1.0, colorado.2.0, colorado.3.0 - else - DOCKER_TAG="stable" - fi + DOCKER_TAG="stable" fi # Start the build @@ -90,6 +87,9 @@ echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" echo "--------------------------------------------------------" echo if [[ $DOCKER_REPO_NAME == *"dovetail"* ]]; then + if [[ -n "${RELEASE_VERSION-}" ]]; then + DOCKER_TAG=${RELEASE_VERSION} + fi cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG -f $DOCKERFILE ." else cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH |