Harden E2E tester build against transient MCR DNS failures
Some checks failed
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Build and Push CICD Image (push) Has been cancelled
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Backend Tests (push) Has been cancelled
CICD / Pre-commit Checks (push) Has been cancelled
CICD / Frontend Tests (push) Has been cancelled
CICD / Backend Doctests (push) Has been cancelled
CICD / Build and Publish CICD Base Image (push) Has started running
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Backend Base Image (push) Has been cancelled
CICD / Build Frontend Base Image (push) Has been cancelled
CICD / Build Integration Tester Image (push) Has been cancelled
CICD / Build E2E Tester Image (push) Has been cancelled
CICD / Build and Publish Runtime Images (Legacy Disabled) (push) Has been cancelled
CICD / Build Backend Main Image (push) Has been cancelled
CICD / Build Frontend Main Image (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Runtime Images Failure Postmortem (push) Has been cancelled
CICD / Source Lanes Failure Postmortem (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / Integration Tests Failure Postmortem (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled

This commit is contained in:
copilotcoder
2026-07-07 19:22:29 -04:00
parent d4aa16e18a
commit bd174d8186

View File

@@ -831,6 +831,40 @@ jobs:
run: |
set -euo pipefail
PLAYWRIGHT_BASE_IMAGE="mcr.microsoft/playwright:v1.56.1-jammy"
retry_pull_with_dns_probe() {
image_ref="$1"
attempts="${2:-6}"
backoff="${3:-5}"
attempt=1
while [ "${attempt}" -le "${attempts}" ]; do
echo "base pull attempt ${attempt}/${attempts} for ${image_ref}"
if getent hosts mcr.microsoft >/dev/null 2>&1; then
echo "mcr.microsoft DNS resolution: ok"
else
echo "mcr.microsoft DNS resolution: failed"
fi
timeout 10 curl -fsSIL "https://mcr.microsoft/v2/" >/dev/null || true
if docker pull "${image_ref}"; then
return 0
fi
if [ "${attempt}" -lt "${attempts}" ]; then
sleep_seconds=$((backoff * attempt))
echo "Retrying base image pull in ${sleep_seconds}s"
sleep "${sleep_seconds}"
fi
attempt=$((attempt + 1))
done
return 1
}
retry_registry_op() {
op_name="$1"
image_ref="$2"
@@ -865,7 +899,8 @@ jobs:
E2E_TESTER_REPO="${GITEA_REGISTRY}/darkhelm.org/plex-playlist-e2e"
E2E_TESTER_TAG_REF="${E2E_TESTER_REPO}:${HEAD_SHA}"
docker build -f Dockerfile.e2e-tester -t plex-playlist-e2e:"${HEAD_SHA}" .
retry_pull_with_dns_probe "${PLAYWRIGHT_BASE_IMAGE}" 6 5
DOCKER_BUILDKIT=0 docker build --pull=false -f Dockerfile.e2e-tester -t plex-playlist-e2e:"${HEAD_SHA}" .
docker tag plex-playlist-e2e:"${HEAD_SHA}" "${E2E_TESTER_TAG_REF}"
retry_registry_op push "${E2E_TESTER_TAG_REF}" 5 4