Skip to content

Commit

Permalink
docker_push.sh: Exit script if docker login fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Parmann authored and epa095 committed Nov 6, 2018
1 parent d8769d3 commit 2187eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fi
if [[ -z "${DOCKER_USERNAME}" ]]; then
echo "DOCKER_USERNAME not set: we assume that you are already logged in to the docker registry."
else
# Logging in to the docker registry
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin $DOCKER_REGISTRY
# Logging in to the docker registry, exiting script if it fails
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin $DOCKER_REGISTRY || exit 1
fi

export git_sha=$(git rev-parse HEAD | cut -c 1-8)
Expand Down

0 comments on commit 2187eeb

Please sign in to comment.