Merge pull request #569 from simonduq/fix/docker-build-fail

CI: fail test in case building Docker image failed
This commit is contained in:
George Oikonomou 2018-06-05 22:04:02 +01:00 committed by GitHub
commit 77d07ea6b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,10 @@ before_install:
else else
echo "Docker image changed, build from Dockerfile" echo "Docker image changed, build from Dockerfile"
docker build tools/docker -t $DOCKER_IMG; 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 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 "This build is for an update of branch develop. Push image to Dockerhub"
echo $DOCKERHUB_PASSWD | docker login --username contiker --password-stdin echo $DOCKERHUB_PASSWD | docker login --username contiker --password-stdin