From 94398b0176251f1bcde902472a9d90faa63c414c Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 5 Jun 2018 15:11:32 +0200 Subject: [PATCH] CI: fail test in case building Docker image failed --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2ba80e188..da6dea283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,10 @@ before_install: else echo "Docker image changed, build from Dockerfile" docker build tools/docker -t $DOCKER_IMG; + if [ $? != 0 ]; then + echo "Failed to build Docker image" + exit 1 + fi if [ $TRAVIS_SECURE_ENV_VARS == true ] && [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == 'develop' ]; then echo "This build is for an update of branch develop. Push image to Dockerhub" echo $DOCKERHUB_PASSWD | docker login --username contiker --password-stdin