From 3b619bf034e54b557408793aca0587f6382d24e0 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Thu, 1 Jun 2017 22:32:35 +0200 Subject: [PATCH] Add logs to the docker deployment script --- scripts/docker-publish.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/docker-publish.sh b/scripts/docker-publish.sh index cae2c69a..7fe74178 100755 --- a/scripts/docker-publish.sh +++ b/scripts/docker-publish.sh @@ -2,14 +2,23 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then TAG=latest + if [ ! -z "$TRAVIS_TAG" ]; then TAG=$TRAVIS_TAG fi IMAGE_NAME=clems4ever/authelia + IMAGE_WITH_TAG=$IMAGE_NAME:$TAG + echo "Login to Dockerhub." docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; - docker tag $IMAGE_NAME $IMAGE_NAME:$TAG; - docker push $IMAGE_NAME:$TAG; + + echo "Docker image $IMAGE_WITH_TAG will be deployed on Dockerhub." + docker tag $IMAGE_NAME $IMAGE_WITH_TAG; + docker push $IMAGE_WITH_TAG; + echo "Docker image deployed successfully." + +else + echo "Docker image will not be deployed on Dockerhub." fi