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>
if [[ "$BRANCH" == "master" ]]; then
DOCKER_TAG="latest"
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}"
DOCKER_TAG=${RELEASE_VERSION}
if git checkout ${RELEASE_VERSION}; then
echo "Successfully checked out the git tag ${RELEASE_VERSION}"
-else
- DOCKER_TAG="stable"
fi
if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then
fi
if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then