From 62aca9af4e94f792b6b2b3c5e23cafdb846cbc38 Mon Sep 17 00:00:00 2001 From: Petteri Pesonen Date: Mon, 19 Oct 2020 13:40:58 +0300 Subject: [PATCH] Fix travis build script where wrong production branch value were used --- travis-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis-build.sh b/travis-build.sh index bc6fb1a..29a556f 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -24,13 +24,13 @@ echo "Building image with tag -> ${DOCKER_TAG}" docker build --tag=$DOCKER_IMAGE . if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then - if [[ " ${BUILD_AND_PUSH_BRANCHES[*]} " == *"$DOCKER_TAG"* ]]; then + if [[ " ${BUILD_AND_PUSH_BRANCHES[*]} " == *"$TRAVIS_BRANCH"* ]]; then echo "Pushing builded image to registry with tag -> ${DOCKER_TAG}" docker login -u $DOCKER_USER -p $DOCKER_AUTH docker push $DOCKER_IMAGE else - echo "Pushed branch is not targeted environment branch (development, stage, production). Image is not pushed to registry" + echo "Pushed branch is not targeted environment branch (development, stage, master). Image is not pushed to registry" fi else echo "Image is not pushed to registry for pull requests"