fix(ci): Retry after docker log follow ssh failures (#4198)
* Retry after log ssh failures in full sync test * Retry after log failures in other docker tests
This commit is contained in:
parent
d476c18339
commit
4f92df42b0
|
|
@ -236,12 +236,15 @@ jobs:
|
||||||
- name: Full sync
|
- name: Full sync
|
||||||
id: full-sync
|
id: full-sync
|
||||||
run: |
|
run: |
|
||||||
gcloud compute ssh \
|
for RETRY in 1 2 3 4; do
|
||||||
full-sync-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
gcloud compute ssh \
|
||||||
--zone ${{ env.ZONE }} \
|
full-sync-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
--quiet \
|
--zone ${{ env.ZONE }} \
|
||||||
--ssh-flag="-o ServerAliveInterval=5" \
|
--quiet \
|
||||||
--command="docker logs --follow ${{ env.CONTAINER_NAME }}"
|
--ssh-flag="-o ServerAliveInterval=15" \
|
||||||
|
--command="docker logs --follow ${{ env.CONTAINER_NAME }}" \
|
||||||
|
|| echo "ssh disconnected $RETRY times"
|
||||||
|
done
|
||||||
|
|
||||||
EXIT_CODE=$(\
|
EXIT_CODE=$(\
|
||||||
gcloud compute ssh \
|
gcloud compute ssh \
|
||||||
|
|
|
||||||
|
|
@ -347,12 +347,15 @@ jobs:
|
||||||
id: sync-to-checkpoint
|
id: sync-to-checkpoint
|
||||||
if: ${{ steps.create-instance.outcome == 'success' }}
|
if: ${{ steps.create-instance.outcome == 'success' }}
|
||||||
run: |
|
run: |
|
||||||
gcloud compute ssh \
|
for RETRY in 1 2 3 4; do
|
||||||
regenerate-disk-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
gcloud compute ssh \
|
||||||
--zone ${{ env.ZONE }} \
|
regenerate-disk-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
--quiet \
|
--zone ${{ env.ZONE }} \
|
||||||
--ssh-flag="-o ServerAliveInterval=5" \
|
--quiet \
|
||||||
--command="docker logs --follow ${{ env.CONTAINER_NAME }}"
|
--ssh-flag="-o ServerAliveInterval=15" \
|
||||||
|
--command="docker logs --follow ${{ env.CONTAINER_NAME }}" \
|
||||||
|
|| echo "ssh disconnected $RETRY times"
|
||||||
|
done
|
||||||
|
|
||||||
EXIT_CODE=$(\
|
EXIT_CODE=$(\
|
||||||
gcloud compute ssh \
|
gcloud compute ssh \
|
||||||
|
|
@ -512,12 +515,15 @@ jobs:
|
||||||
- name: Sync past mandatory checkpoint
|
- name: Sync past mandatory checkpoint
|
||||||
id: sync-past-checkpoint
|
id: sync-past-checkpoint
|
||||||
run: |
|
run: |
|
||||||
gcloud compute ssh \
|
for RETRY in 1 2 3 4; do
|
||||||
sync-checkpoint-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
gcloud compute ssh \
|
||||||
--zone ${{ env.ZONE }} \
|
sync-checkpoint-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
--quiet \
|
--zone ${{ env.ZONE }} \
|
||||||
--ssh-flag="-o ServerAliveInterval=5" \
|
--quiet \
|
||||||
--command="docker logs --follow ${{ env.CONTAINER_NAME }}"
|
--ssh-flag="-o ServerAliveInterval=15" \
|
||||||
|
--command="docker logs --follow ${{ env.CONTAINER_NAME }}" \
|
||||||
|
|| echo "ssh disconnected $RETRY times"
|
||||||
|
done
|
||||||
|
|
||||||
EXIT_CODE=$(\
|
EXIT_CODE=$(\
|
||||||
gcloud compute ssh \
|
gcloud compute ssh \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue