Skip to content

Commit

Permalink
Publish container image only in production or builds on dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
davideschiera committed May 24, 2019
1 parent 20e84c2 commit 5537d76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ publish_artifacts() {
fi

if [ "${BUILD_CONTAINER}" = "true" ]; then
echo "Publishing image to Docker hub..."
if [ "${ENVIRONMENT}" = "production" ] || [ "${GIT_BRANCH}" = "dev" ]; then
echo "Publishing image to Docker hub..."

docker push ${DOCKER_IMAGE_TAG}
docker push ${DOCKER_IMAGE_TAG}
fi
fi
}

Expand Down

0 comments on commit 5537d76

Please sign in to comment.