Stabilize self-hosted CI workflows and resolve issue #62 #73

Merged
darkhelm merged 80 commits from feature/two-stage-runtime-images into main 2026-07-13 11:16:18 -04:00
Showing only changes of commit bd174d8186 - Show all commits

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