diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2020-02-21 12:39:37 -0800 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2020-02-21 12:39:37 -0800 |
commit | 2039ffda9cced951523b1b8138f7406e2446c717 (patch) | |
tree | 8caf50b9f42c0917a84e02cb683532ce8195312a | |
parent | 46f75f47dc18e7c8c665d01edd3de9dc939e2615 (diff) |
Push Docker Release from Tags on the Master Branch
Any change that was merged to master for docker builds was tagged as
latest, regardless if that change was triggered by a new tag. This fixes
the docker script logic to allow containers to be tagged and pushed from
tags on the master branch.
Change-Id: I80e019b90d2dd3dd216005a3bd62d6d741c1d507
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
-rw-r--r-- | jjb/releng/opnfv-docker.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index de39f0628..40e0ed6e2 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -105,7 +105,13 @@ fi if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" -elif [[ -n "${RELEASE_VERSION-}" ]]; then +fi + +if [[ "$BRANCH" =~ "stable" ]]; then + DOCKER_TAG="stable" +fi + +if [[ -n "${RELEASE_VERSION-}" ]]; then DOCKER_TAG=${RELEASE_VERSION} if git checkout ${RELEASE_VERSION}; then echo "Successfully checked out the git tag ${RELEASE_VERSION}" @@ -114,8 +120,6 @@ elif [[ -n "${RELEASE_VERSION-}" ]]; then git tag exit 1 fi -else - DOCKER_TAG="stable" fi if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then |