From 93529b91ec1043eaf58ac929af5cc089c7adacb3 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Tue, 7 Jul 2026 23:39:23 -0400 Subject: [PATCH] Use internal Playwright mirror for E2E tester builds --- .gitea/workflows/cicd.yaml | 18 ++++++++++-------- Dockerfile.e2e-tester | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index d5a16a3..83eaaa2 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -864,9 +864,9 @@ jobs: run: | set -euo pipefail - PLAYWRIGHT_BASE_IMAGE="mcr.microsoft/playwright:v1.56.1-jammy" + PLAYWRIGHT_BASE_IMAGE="${GITEA_REGISTRY}/darkhelm.org/playwright-browsers:v1.56.1-jammy" - retry_pull_with_dns_probe() { + retry_base_pull() { image_ref="$1" attempts="${2:-6}" backoff="${3:-5}" @@ -875,13 +875,13 @@ jobs: 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" + if getent hosts "${GITEA_REGISTRY_HOST}" >/dev/null 2>&1; then + echo "${GITEA_REGISTRY_HOST} DNS resolution: ok" else - echo "mcr.microsoft DNS resolution: failed" + echo "${GITEA_REGISTRY_HOST} DNS resolution: failed" fi - timeout 10 curl -fsSIL "https://mcr.microsoft/v2/" >/dev/null || true + timeout 10 curl -fsSIL "https://${GITEA_REGISTRY}/v2/" >/dev/null || true if docker pull "${image_ref}"; then return 0 @@ -932,8 +932,10 @@ jobs: E2E_TESTER_REPO="${GITEA_REGISTRY}/darkhelm.org/plex-playlist-e2e" E2E_TESTER_TAG_REF="${E2E_TESTER_REPO}:${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}" . + retry_base_pull "${PLAYWRIGHT_BASE_IMAGE}" 6 5 + DOCKER_BUILDKIT=0 docker build --pull=false -f Dockerfile.e2e-tester \ + --build-arg PLAYWRIGHT_BASE_IMAGE="${PLAYWRIGHT_BASE_IMAGE}" \ + -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 diff --git a/Dockerfile.e2e-tester b/Dockerfile.e2e-tester index 57fff55..a79f3ea 100644 --- a/Dockerfile.e2e-tester +++ b/Dockerfile.e2e-tester @@ -1,4 +1,5 @@ -FROM mcr.microsoft/playwright:v1.56.1-jammy +ARG PLAYWRIGHT_BASE_IMAGE=mcr.microsoft/playwright:v1.56.1-jammy +FROM ${PLAYWRIGHT_BASE_IMAGE} WORKDIR /workspace/frontend