summaryrefslogtreecommitdiffstats
path: root/jjb/opnfv
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2016-01-11 17:47:47 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-11 17:47:48 +0000
commitc2dc6cfaabc0662f3167d2e7fd5242c4adacad98 (patch)
treea21f395f3dbfd2c254901f3228f487b847b1907d /jjb/opnfv
parentd15f113e92cbb821d364b88827c761ec64e67338 (diff)
parentb1c855f195b0499f8e499e28419f0b5f059f020a (diff)
Merge "Enable test projects' docker image builds for stable/brahmaputra branch"
Diffstat (limited to 'jjb/opnfv')
-rw-r--r--jjb/opnfv/opnfv-docker.sh37
-rw-r--r--jjb/opnfv/opnfv-docker.yml4
2 files changed, 24 insertions, 17 deletions
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh
index 545aef6dd..81bab33bb 100644
--- a/jjb/opnfv/opnfv-docker.sh
+++ b/jjb/opnfv/opnfv-docker.sh
@@ -53,22 +53,6 @@ if [[ "$UPDATE_LATEST_STABLE" == "true" ]]; then
fi
-# Get tag version
-cd $WORKSPACE
-git clone https://gerrit.opnfv.org/gerrit/releng
-
-DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker \
- -n $DOCKER_REPO_NAME)
-
-ret_val=$?
-if [ $ret_val -ne 0 ]; then
- echo "Error retrieving the version tag."
- exit 1
-else
- echo "Tag version to be build and pushed: $DOCKER_TAG"
-fi
-
-
# cd to directory where Dockerfile is located
if [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then
cd $WORKSPACE/docker
@@ -83,6 +67,27 @@ else
exit 1
fi
+
+# Get tag version
+branch=$(git rev-parse --abbrev-ref HEAD)
+if [ $branch == "master" ]; then
+ DOCKER_TAG="master"
+else
+ cd $WORKSPACE
+ git clone https://gerrit.opnfv.org/gerrit/releng
+
+ DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker \
+ -n $DOCKER_REPO_NAME)
+
+ ret_val=$?
+ if [ $ret_val -ne 0 ]; then
+ echo "Error retrieving the version tag."
+ exit 1
+ fi
+fi
+echo "Tag version to be build and pushed: $DOCKER_TAG"
+
+
# Start the build
echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG..."
diff --git a/jjb/opnfv/opnfv-docker.yml b/jjb/opnfv/opnfv-docker.yml
index fcbe60be2..13063e39b 100644
--- a/jjb/opnfv/opnfv-docker.yml
+++ b/jjb/opnfv/opnfv-docker.yml
@@ -17,7 +17,9 @@
stream:
- master:
- branch: 'master'
+ branch: '{stream}'
+ - brahmaputra:
+ branch: 'stable/{stream}'
########################
# job templates