Skip to content

Commit

Permalink
ci(hotrod): Print HotROD container logs in case of test failure
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Oct 15, 2023
1 parent a30e636 commit baf0a1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-hotrod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ jobs:
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

- name: Print logs from hotrod
run: docker logs example-hotrod
if: failure()
6 changes: 4 additions & 2 deletions scripts/hotrod-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ make build-examples GOOS=linux GOARCH=arm64
REPO=jaegertracing/example-hotrod
platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64"
make prepare-docker-buildx
#build image locally for integration test

# build image locally (-l) for integration test
bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${platforms}"

export CID=$(docker run -d -p 8080:8080 localhost:5000/$REPO:${GITHUB_SHA})
# pass --name example-hotrod so that we can do `docker logs example-hotrod` later
export CID=$(docker run -d --name example-hotrod -p 8080:8080 localhost:5000/$REPO:${GITHUB_SHA})
i=0
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8080)" != "200" && ${i} -lt 30 ]]; do
sleep 1
Expand Down

0 comments on commit baf0a1b

Please sign in to comment.