summaryrefslogtreecommitdiffstats
path: root/jjb/releng/opnfv-docker.sh
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2017-11-29 16:53:36 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2018-01-09 10:24:23 -0800
commit640a4e231f3336cb06c611d88c6e8fed8976274b (patch)
treed8f944a4f6ba86aba92ec748abe4906fb4b35a27 /jjb/releng/opnfv-docker.sh
parentb74ac9b3ce17ba5057684588ebbf8d95465b7482 (diff)
Docker Builds from Git Tag
Facilitates the creation of docker images from tags pushed to Gerrit, which should remove the need to manually trigger 'tagged' builds. Fixes a typo in the 'gerrit-trigger-tag-created' macro, replaces 'RELEASE_VERSION' with 'GERRIT_REFNAME', and adds the tag-trigger to docker builds. Change-Id: I6d8f8f34b1c51d74bb98211dfae21c37cf9356fa Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb/releng/opnfv-docker.sh')
-rw-r--r--jjb/releng/opnfv-docker.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh
index ec7b3fda3..db2213cc4 100644
--- a/jjb/releng/opnfv-docker.sh
+++ b/jjb/releng/opnfv-docker.sh
@@ -75,6 +75,9 @@ echo "Current branch: $BRANCH"
BUILD_BRANCH=$BRANCH
+GERRIT_REFNAME=${GERRIT_REFNAME:-''}
+RELEASE_VERSION=${GERRIT_REFNAME/refs\/tags//}
+
if [[ "$BRANCH" == "master" ]]; then
DOCKER_TAG="latest"
elif [[ -n "${RELEASE_VERSION-}" ]]; then