From 93414eb74f564de0357303046ff35309bcd9819b Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Wed, 29 Jun 2022 16:46:02 -0400 Subject: [PATCH] fix(ci): docker wait not finding container We had this issue before, I can't recall if this was a parsing error between GitHub Actions and gcloud `--command` parsing, but we had to change this into two pieces. This implementation keeps it how we did it before https://github.com/ZcashFoundation/zebra/blob/9b9578c99975952a291006dde8d2828fd3e97799/.github/workflows/test.yml#L235-L243 --- .github/workflows/deploy-gcp-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-gcp-tests.yml b/.github/workflows/deploy-gcp-tests.yml index 6710ba3e5c9..dd75b76870d 100644 --- a/.github/workflows/deploy-gcp-tests.yml +++ b/.github/workflows/deploy-gcp-tests.yml @@ -680,15 +680,15 @@ jobs: # `docker wait` can also wait for multiple containers, but we only ever wait for a single container. - name: Result of ${{ inputs.test_id }} test run: | + EXIT_CODE=$(\ gcloud compute ssh \ ${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \ --zone ${{ env.ZONE }} \ --quiet \ --ssh-flag="-o ServerAliveInterval=5" \ - --command \ - "\ - exit $(docker wait ${{ inputs.test_id }}) \ - " + --command="docker wait ${{ inputs.test_id }}") + + exit ${EXIT_CODE} # create a state image from the instance's state disk, if requested by the caller