Expand mirror repair script for Renovate and Playwright images
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 10s
CICD / Build and Push CICD Image (push) Successful in 19m20s
CICD / Build CICD Image Failure Postmortem (push) Has been skipped
CICD / Pre-commit Checks (push) Successful in 3m9s
CICD / Frontend Tests (push) Successful in 38s
CICD / Backend Doctests (push) Successful in 20s
CICD / Backend Tests (push) Successful in 10m3s
CICD / CICD Tests Complete (push) Successful in 12s
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Build Integration Tester Image (push) Successful in 1m53s
CICD / Build Frontend Base Image (push) Successful in 7m56s
CICD / Build Backend Base Image (push) Failing after 10m32s
CICD / Build Frontend Main Image (push) Successful in 4m6s
CICD / Build Backend Main Image (push) Has been skipped
CICD / Build E2E Tester Image (push) Successful in 24m46s
CICD / Production Images Complete (push) Failing after 11s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / Production Image Failures Postmortem (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 10s
CICD / Build and Push CICD Image (push) Successful in 19m20s
CICD / Build CICD Image Failure Postmortem (push) Has been skipped
CICD / Pre-commit Checks (push) Successful in 3m9s
CICD / Frontend Tests (push) Successful in 38s
CICD / Backend Doctests (push) Successful in 20s
CICD / Backend Tests (push) Successful in 10m3s
CICD / CICD Tests Complete (push) Successful in 12s
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Build Integration Tester Image (push) Successful in 1m53s
CICD / Build Frontend Base Image (push) Successful in 7m56s
CICD / Build Backend Base Image (push) Failing after 10m32s
CICD / Build Frontend Main Image (push) Successful in 4m6s
CICD / Build Backend Main Image (push) Has been skipped
CICD / Build E2E Tester Image (push) Successful in 24m46s
CICD / Production Images Complete (push) Failing after 11s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / Production Image Failures Postmortem (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
This commit is contained in:
@@ -5,36 +5,64 @@ hosts = [
|
||||
"pi-desktop.darkhelm.lan",
|
||||
]
|
||||
|
||||
# Pull upstream tag, retag/push to local registry mirror, verify mirror tag.
|
||||
# Pull upstream tags, retag/push to local registry mirrors, and verify pullability.
|
||||
remote_code = """
|
||||
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.56.1-jammy", "kankali.darkhelm.lan:3001/darkhelm.org/playwright-browsers:v1.56.1-jammy"),
|
||||
]
|
||||
|
||||
def classify_failure(prefix, log_path):
|
||||
mismatch = !(grep -qi "http response to https client" @(log_path))
|
||||
print(f"{prefix}:https-mismatch" if mismatch.returncode == 0 else f"{prefix}:failed")
|
||||
|
||||
$(docker pull ubuntu:22.04)
|
||||
$(docker pull ghcr.io/catthehacker/ubuntu:act-latest)
|
||||
$(docker tag ghcr.io/catthehacker/ubuntu:act-latest kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest)
|
||||
|
||||
push = !(docker push kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest > /tmp/mirror-push.log 2>&1)
|
||||
if push.returncode == 0:
|
||||
print("MIRROR_PUSH:ok")
|
||||
else:
|
||||
mismatch = !(grep -qi "http response to https client" /tmp/mirror-push.log)
|
||||
print("MIRROR_PUSH:https-mismatch" if mismatch.returncode == 0 else "MIRROR_PUSH:failed")
|
||||
|
||||
# Validate that the mirror is actually pullable from this host's Docker configuration.
|
||||
$(docker image rm kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest > /dev/null 2> /dev/null || true)
|
||||
pull = !(docker pull kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest > /tmp/mirror-verify.log 2>&1)
|
||||
if pull.returncode == 0:
|
||||
print("MIRROR_PULL:ok")
|
||||
else:
|
||||
mismatch = !(grep -qi "http response to https client" /tmp/mirror-verify.log)
|
||||
print("MIRROR_PULL:https-mismatch" if mismatch.returncode == 0 else "MIRROR_PULL:failed")
|
||||
|
||||
if $(docker image inspect ubuntu:22.04):
|
||||
print("UBUNTU22_PRESENT")
|
||||
else:
|
||||
print("UBUNTU22_MISSING")
|
||||
if $(docker image inspect kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest):
|
||||
print("MIRROR_PRESENT")
|
||||
else:
|
||||
print("MIRROR_MISSING")
|
||||
|
||||
for label, source_image, mirror_image in mirror_pairs:
|
||||
print(f"{label}_SOURCE={source_image}")
|
||||
print(f"{label}_MIRROR={mirror_image}")
|
||||
|
||||
src_pull_log = f"/tmp/{label.lower()}-source-pull.log"
|
||||
mirror_push_log = f"/tmp/{label.lower()}-mirror-push.log"
|
||||
mirror_verify_log = f"/tmp/{label.lower()}-mirror-verify.log"
|
||||
|
||||
src_pull = !(docker pull @(source_image) > @(src_pull_log) 2>&1)
|
||||
if src_pull.returncode == 0:
|
||||
print(f"{label}_SOURCE_PULL:ok")
|
||||
else:
|
||||
classify_failure(f"{label}_SOURCE_PULL", src_pull_log)
|
||||
continue
|
||||
|
||||
tag = !(docker tag @(source_image) @(mirror_image))
|
||||
if tag.returncode != 0:
|
||||
print(f"{label}_TAG:failed")
|
||||
continue
|
||||
|
||||
push = !(docker push @(mirror_image) > @(mirror_push_log) 2>&1)
|
||||
if push.returncode == 0:
|
||||
print(f"{label}_MIRROR_PUSH:ok")
|
||||
else:
|
||||
classify_failure(f"{label}_MIRROR_PUSH", mirror_push_log)
|
||||
continue
|
||||
|
||||
# Validate mirror pullability with this host's Docker registry config.
|
||||
$(docker image rm @(mirror_image) > /dev/null 2> /dev/null || true)
|
||||
verify = !(docker pull @(mirror_image) > @(mirror_verify_log) 2>&1)
|
||||
if verify.returncode == 0:
|
||||
print(f"{label}_MIRROR_PULL:ok")
|
||||
else:
|
||||
classify_failure(f"{label}_MIRROR_PULL", mirror_verify_log)
|
||||
|
||||
if $(docker image inspect @(mirror_image)):
|
||||
print(f"{label}_MIRROR_PRESENT")
|
||||
else:
|
||||
print(f"{label}_MIRROR_MISSING")
|
||||
"""
|
||||
|
||||
for host in hosts:
|
||||
|
||||
Reference in New Issue
Block a user