chore(ci): centralize runtime and image version constants
Some checks failed
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Source Checks (push) Has been cancelled
CICD / Dependency Audits (Informational) (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Release Images (push) Has been cancelled
CICD / Build Tester Images (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Production Image Failures 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
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Promote Staging Images To Release (push) Has been cancelled
CICD / Build and Push CICD Images (push) Has been cancelled
Some checks failed
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Source Checks (push) Has been cancelled
CICD / Dependency Audits (Informational) (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Release Images (push) Has been cancelled
CICD / Build Tester Images (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Production Image Failures 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
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Promote Staging Images To Release (push) Has been cancelled
CICD / Build and Push CICD Images (push) Has been cancelled
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
#!/usr/bin/env xonsh
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def load_ci_versions():
|
||||
env_path = Path(__file__).resolve().parents[2] / "versions" / "ci.env"
|
||||
values = {}
|
||||
for raw_line in env_path.read_text().splitlines():
|
||||
line = raw_line.strip()
|
||||
if not line or line.startswith("#") or "=" not in line:
|
||||
continue
|
||||
key, value = line.split("=", 1)
|
||||
values[key.strip()] = value.strip()
|
||||
return values
|
||||
|
||||
|
||||
ci_versions = load_ci_versions()
|
||||
playwright_tag = ci_versions["PLAYWRIGHT_IMAGE_TAG"]
|
||||
|
||||
hosts = [
|
||||
"kankali.darkhelm.lan",
|
||||
"zhokq.darkhelm.lan",
|
||||
@@ -14,7 +32,7 @@ remote_code_template = """
|
||||
mirror_pairs = [
|
||||
("ACT_UBUNTU", "ghcr.io/catthehacker/ubuntu:act-latest", "kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest"),
|
||||
("RENOVATE", "ghcr.io/renovatebot/renovate:41", "kankali.darkhelm.lan:3001/darkhelm.org/renovate:41"),
|
||||
("PLAYWRIGHT", "mcr.microsoft.com/playwright:v1.61.1-jammy", "kankali.darkhelm.lan:3001/darkhelm.org/playwright-browsers:v1.61.1-jammy"),
|
||||
("PLAYWRIGHT", "mcr.microsoft.com/playwright:" + __PLAYWRIGHT_TAG__, "kankali.darkhelm.lan:3001/darkhelm.org/playwright-browsers:" + __PLAYWRIGHT_TAG__),
|
||||
]
|
||||
|
||||
is_publisher = __IS_PUBLISHER__
|
||||
@@ -94,5 +112,10 @@ for label, source_image, mirror_image in mirror_pairs:
|
||||
|
||||
for host in hosts:
|
||||
print(f"\n=== {host} ===")
|
||||
remote_code = remote_code_template.replace("__IS_PUBLISHER__", "True" if host == publisher_host else "False")
|
||||
quoted_playwright_tag = repr(playwright_tag)
|
||||
remote_code = (
|
||||
remote_code_template
|
||||
.replace("__IS_PUBLISHER__", "True" if host == publisher_host else "False")
|
||||
.replace("__PLAYWRIGHT_TAG__", quoted_playwright_tag)
|
||||
)
|
||||
ssh @(host) @(remote_code)
|
||||
|
||||
@@ -4,6 +4,17 @@ set -euo pipefail
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
COMPOSE_FILE="${ROOT_DIR}/compose.ci.e2e.yml"
|
||||
PROJECT_NAME="${COMPOSE_PROJECT_NAME:-plex-e2e-local}"
|
||||
VERSION_ENV_FILE="${ROOT_DIR}/versions/ci.env"
|
||||
|
||||
if [ ! -f "${VERSION_ENV_FILE}" ]; then
|
||||
echo "❌ Missing version source file: ${VERSION_ENV_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -a
|
||||
# shellcheck source=../versions/ci.env
|
||||
source "${VERSION_ENV_FILE}"
|
||||
set +a
|
||||
|
||||
mkdir -p "${ROOT_DIR}/frontend/.playwright-artifacts"
|
||||
|
||||
@@ -12,7 +23,7 @@ export DEPLOYABLE_FRONTEND_IMAGE="${DEPLOYABLE_FRONTEND_IMAGE:-plex-playlist-fro
|
||||
export DB_PASSWORD="${DB_PASSWORD:-plex_password}"
|
||||
export DB_URL="${DB_URL:-postgresql://plex_user:${DB_PASSWORD}@database:5432/plex_playlist}"
|
||||
export E2E_ARTIFACT_DIR="${E2E_ARTIFACT_DIR:-${ROOT_DIR}/frontend/.playwright-artifacts}"
|
||||
export PLAYWRIGHT_E2E_IMAGE="${PLAYWRIGHT_E2E_IMAGE:-mcr.microsoft.com/playwright:v1.61.1-jammy}"
|
||||
export PLAYWRIGHT_E2E_IMAGE="${PLAYWRIGHT_E2E_IMAGE:-${PLAYWRIGHT_IMAGE}}"
|
||||
|
||||
cleanup() {
|
||||
docker compose -p "${PROJECT_NAME}" -f "${COMPOSE_FILE}" down -v --remove-orphans >/dev/null 2>&1 || true
|
||||
|
||||
Reference in New Issue
Block a user