summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2017-05-02 04:07:57 -0400
committerJose Lausuch <jose.lausuch@ericsson.com>2017-05-03 07:49:29 +0000
commit90d4ee822d7915ee53997c099f24146a7ba4613c (patch)
tree931a1d20dc407e2bfc33ef40cde7a54fd206d407 /jjb
parent040fe7acebd7a99b0844497582bce6c351fe1489 (diff)
dovetail: docker tag support
JIRA: DOVETAIL-419 since dovetal has no A/B/C/D branch, only have master, need docker image name sth like opnfv/dovetail:plugfest_april_2017 rather than opnfv/dovetail:<release>.1.0, etc. then when RELEASE_VERSION is empty, generate opnfv/dovetail:latest ortherwise opnfv/dovetail:<RELEASE_VERSION> Change-Id: I92573bee35da16305074393401e5e5da65aaa22c Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/releng/opnfv-docker.sh14
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