[Tests] reduce CI flakiness from transient Docker registry failures

Container-based suites and the `nvm_download` httpbin check hard-fail whenever DockerHub is briefly unreachable
(observed: `dial tcp ...:443: connect: connection refused` while pulling images),
even though the change under test is fine.
This is unrelated to any test logic.

- tests-xenial / tests-installation-node: retry the `docker pull` up to 5 times before `docker run`, mirroring the existing apt-get retry
- `nvm_download` test: retry the httpbin pull and skip the auth-header checks (rather than fail) when the image cannot be pulled or run, and make cleanup tolerant of a missing container.
This commit is contained in:
Jordan Harband
2026-06-03 13:12:31 -07:00
parent 53855417eb
commit dd13968c1e
3 changed files with 31 additions and 8 deletions

View File

@@ -55,6 +55,12 @@ jobs:
- run: npx which urchin
- name: Run installation_node tests in container
run: |
# Retry the image pull to tolerate transient Docker registry failures
for i in 1 2 3 4 5; do
docker pull ubuntu:16.04 && break
echo "docker pull failed, attempt $i/5"
sleep $((i * 5))
done
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \

View File

@@ -52,6 +52,12 @@ jobs:
- run: npx which urchin
- name: Run xenial tests in container
run: |
# Retry the image pull to tolerate transient Docker registry failures
for i in 1 2 3 4 5; do
docker pull ubuntu:16.04 && break
echo "docker pull failed, attempt $i/5"
sleep $((i * 5))
done
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \