diff --git a/.github/workflows/deploy-gcp-tests.yml b/.github/workflows/deploy-gcp-tests.yml index 076ca4b0..b51e6d08 100644 --- a/.github/workflows/deploy-gcp-tests.yml +++ b/.github/workflows/deploy-gcp-tests.yml @@ -592,6 +592,9 @@ jobs: --ssh-flag="-o ConnectTimeout=5" \ --command=' \ set -e; + set -o pipefail; + trap '' PIPE; + sudo docker logs \ --tail all \ --follow \ @@ -599,11 +602,13 @@ jobs: tee --output-error=exit /dev/stderr | \ grep --max-count=1 --extended-regexp --color=always \ "test result: .*ok.* [1-9][0-9]* passed.*finished in"; \ + EXIT_STATUS=$( \ sudo docker wait ${{ inputs.test_id }} || \ sudo docker inspect --format "{{.State.ExitCode}}" ${{ inputs.test_id }} || \ echo "missing container, or missing exit status for container" \ ); \ + echo "sudo docker exit status: $EXIT_STATUS"; \ exit "$EXIT_STATUS" \ '