Skip to content

Commit

Permalink
fix(ci): use better approach
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Oct 6, 2023
1 parent 6cecf7a commit 15107e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/sub-deploy-integration-tests-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ jobs:
--ssh-flag="-o ConnectTimeout=5" \
--command \
"\
while [[ ! -e /dev/sdb ]] || sudo lsof /dev/sdb &>/dev/null do \
echo 'Waiting for /dev/sdb to be free...'; \
sleep 10; \
done; \
# Check if we need to format the disk if no state is needed
if [[ "${{ inputs.needs_zebra_state }}" == "false" && "${{ inputs.needs_lwd_state }}" == "false" ]]; then
sudo mkfs.ext4 -v /dev/sdb
Expand Down Expand Up @@ -345,8 +349,6 @@ jobs:
--ssh-flag="-o ConnectTimeout=5" \
--command \
"\
# Wait for the disk to be attached
while [[ ! -e /dev/sdb ]]; do sleep 1; done && \
sudo docker run \
--name ${{ inputs.test_id }} \
--tty \
Expand Down Expand Up @@ -398,7 +400,7 @@ jobs:
# with that status.
# (`docker wait` can also wait for multiple containers, but we only ever wait for a single container.)
- name: Result of ${{ inputs.test_id }} test
shell: /usr/bin/bash -exo pipefail && trap '' PIPE && {0}
shell: /usr/bin/bash -exo pipefail {0}
run: |
gcloud compute ssh ${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
--zone ${{ vars.GCP_ZONE }} \
Expand Down

0 comments on commit 15107e7

Please sign in to comment.