From c2922033c383beb9da37a66147bdf947ff8ac3ae Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 15 Nov 2024 21:42:52 +0100 Subject: [PATCH] fix(ci): timeout and retry docker smoke test --- .github/workflows/docker-image.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ca4b5fdd4b0..f8380924046 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -110,9 +110,17 @@ jobs: # We test all the images on amd64 host here. This uses QEMU to emulate # the other platforms. - - run: docker run --rm $IMAGE_NAME:linux-amd64 --version - - run: docker run --rm $IMAGE_NAME:linux-arm-v7 --version - - run: docker run --rm $IMAGE_NAME:linux-arm64-v8 --version + # NOTE: --version should finish instantly, but sometimes + # it hangs on github CI (could be qemu issue), so we retry to remove false negatives + - name: Smoke-test linux-amd64 + run: for i in {1..3}; do timeout 15s docker run --rm $IMAGE_NAME:linux-amd64 version --all && break || [ $i = 3 ] && exit 1; done + timeout-minutes: 1 + - name: Smoke-test linux-arm-v7 + run: for i in {1..3}; do timeout 15s docker run --rm $IMAGE_NAME:linux-arm-v7 version --all && break || [ $i = 3 ] && exit 1; done + timeout-minutes: 1 + - name: Smoke-test linux-arm64-v8 + run: for i in {1..3}; do timeout 15s docker run --rm $IMAGE_NAME:linux-arm64-v8 version --all && break || [ $i = 3 ] && exit 1; done + timeout-minutes: 1 # This will only push the previously built images. - if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true'