fix(ci): timeout and retry docker smoke test
Marcin Rataj committed
Nov 15, 2024 at 21:42 UTC
c2922033c383beb9da37a66147bdf947ff8ac3ae
1 file changed
+11
-3
.github/workflows/docker-image.yml
+11
-3
@@ -110,9 +110,17 @@ jobs:
110
111
# We test all the images on amd64 host here. This uses QEMU to emulate
112
# the other platforms.
113
- - run: docker run --rm $IMAGE_NAME:linux-amd64 --version
114
- - run: docker run --rm $IMAGE_NAME:linux-arm-v7 --version
115
- - run: docker run --rm $IMAGE_NAME:linux-arm64-v8 --version
113
+ # NOTE: --version should finish instantly, but sometimes
114
+ # it hangs on github CI (could be qemu issue), so we retry to remove false negatives
115
+ - name: Smoke-test linux-amd64
116
+ run: for i in {1..3}; do timeout 15s docker run --rm $IMAGE_NAME:linux-amd64 version --all && break || [ $i = 3 ] && exit 1; done
117
+ timeout-minutes: 1
118
+ - name: Smoke-test linux-arm-v7
119
+ 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
120
+ timeout-minutes: 1
121
+ - name: Smoke-test linux-arm64-v8
122
+ 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
123
+ timeout-minutes: 1
124
125
# This will only push the previously built images.
126
- if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true'