From 3a99bb5ebfedd5db4d48b2564670fccf8f9b8e8f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 14 Jul 2026 12:53:22 +0200 Subject: test-build: auto-pull the image from the LAN registry when missing require_image now docker-pulls ACTIVE_IMAGE (a fully-qualified registry ref) if it is not already local, instead of erroring out and telling the user to pull by hand. Only errors if the pull itself fails. Pull-if-missing only: a stale local tag is not refreshed (noted for a future --pull flag). Co-Authored-By: Claude Opus 4.8 --- .extras/test-build | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.extras/test-build b/.extras/test-build index 0a655c1..681ddf7 100755 --- a/.extras/test-build +++ b/.extras/test-build @@ -745,18 +745,24 @@ print_summary() { } -# Verify the selected image exists locally. It is built by a separate job; this -# script only consumes it. (Later: a local-registry docker pull slots in here.) +# Ensure the selected image is available locally. It is built by a separate job +# (the image-builder) and pushed to the LAN registry; this script only consumes +# it. If it is not already local, pull it once (ACTIVE_IMAGE is a fully-qualified +# registry ref). A stale local tag is not refreshed here. +# ponytail: pull-if-missing only. If the registry's :current is rebuilt, the +# local copy goes stale silently. Add a --pull force-flag if that bites. require_image() { - if ! docker image inspect "$ACTIVE_IMAGE" >/dev/null 2>&1; then - cat >&2 </dev/null 2>&1 && return 0 + echo "Image not present locally, pulling: $ACTIVE_IMAGE" >&2 + docker pull "$ACTIVE_IMAGE" >&2 && return 0 + cat >&2 <