Skip to content

Commit

Permalink
Show Docker logs if integration test fails (#1587)
Browse files Browse the repository at this point in the history
* dump log if integration test fails

Signed-off-by: Jude Wang <judew@uber.com>

* update the condition to check exit code

Signed-off-by: Jude Wang <judew@uber.com>
  • Loading branch information
guanw authored and yurishkuro committed Aug 10, 2019
1 parent 0341a42 commit 2724a58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/travis/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ export REPO=jaegertracing/all-in-one
docker build -f cmd/all-in-one/Dockerfile -t $REPO:latest cmd/all-in-one
export CID=$(docker run -d -p 16686:16686 -p 5778:5778 $REPO:latest)
make integration-test

if [ $? -ne 0 ] ; then
echo "---- integration test failed unexpectedly ----"
echo "--- check the docker log below for details ---"
docker logs $CID
exit 1
fi

docker kill $CID

# Only push the docker container to Docker Hub for master branch
Expand Down

0 comments on commit 2724a58

Please sign in to comment.