Skip to content

Commit

Permalink
Fix docker builds failing if image did not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
svanoort committed Mar 15, 2016
1 parent be11cfe commit 7d07ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ $? -ne 0 ]; then # Test failed, remove the built image and exit with error
fi
docker tag -f pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION-SNAPSHOT pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION
docker tag -f pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION-SNAPSHOT pyresttest-build-ubuntu-14:latest
docker rmi pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION-SNAPSHOT
docker rmi pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION-SNAPSHOT || true

docker run -t --rm pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT python /tmp/verify_image.py
if [ $? -ne 0 ]; then # Test failed, remove the built image and exit with error
Expand All @@ -32,7 +32,7 @@ if [ $? -ne 0 ]; then # Test failed, remove the built image and exit with error
fi
docker tag -f pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT pyresttest-build-centos6:$CENTOS6_VERSION
docker tag -f pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT pyresttest-build-centos6:latest
docker rmi pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT
docker rmi pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT || true

docker run -t --rm pyresttest-build-python3:$PYTHON3_VERSION-SNAPSHOT python3 /tmp/verify_image.py
if [ $? -ne 0 ]; then # Test failed, remove the built image and exit with error
Expand Down

0 comments on commit 7d07ba1

Please sign in to comment.