Skip to content

Commit

Permalink
Capture Docker failure/success from stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Jan 14, 2025
1 parent 7bbb8dc commit f5ad906
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-basis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
echo $BRANCH_NAME
docker run --rm fusionbillm/basisuedge checkout $BRANCH_NAME
docker_exit_code=$?
echo $docker_exit_code
if [[ "$docker_exit_code" != "0" ]]; then
echo "Docker build and/or tests failed for BASIS build!"
docker run --rm fusionbillm/basisuedge checkout $BRANCH_NAME 2>&1 | tee build.log
if [[ ! $( tail -n 50 buil.log ) == *"All level 1 tests passed"* ]]; then
echo "Docker build and/or level 1 tests failed for BASIS build!"
exit 1
fi
if [[ ! $( tail -n 50 buil.log ) == *"All level 2 tests passed"* ]]; then
echo "Docker build and/or level 2 tests failed for BASIS build!"
exit 1
fi
Expand Down

0 comments on commit f5ad906

Please sign in to comment.