Skip to content

Commit

Permalink
Make build fail if anything fails in push_to_docker script.
Browse files Browse the repository at this point in the history
  • Loading branch information
cscatolini committed Feb 11, 2019
1 parent 6a9746d commit 552f5b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions push_to_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,24 @@ if [ "$LIBRDKAFKA_VERSION" != "master" ]; then

echo "sending image to dockerhub"
docker build -t pusher .
if [ $? -ne 0 ]; then
exit 1
fi
docker tag pusher:latest tfgco/pusher:$VERSION.$TRAVIS_BUILD_NUMBER
docker tag pusher:latest tfgco/pusher:$VERSION
docker tag pusher:latest tfgco/pusher:latest
docker push tfgco/pusher:$VERSION.$TRAVIS_BUILD_NUMBER
if [ $? -ne 0 ]; then
exit 1
fi
docker push tfgco/pusher:$VERSION
if [ $? -ne 0 ]; then
exit 1
fi
docker push tfgco/pusher:latest
if [ $? -ne 0 ]; then
exit 1
fi

DOCKERHUB_LATEST=$(python get_latest_tag.py)

Expand Down

0 comments on commit 552f5b4

Please sign in to comment.