mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
Every check asked `docker manifest inspect` whether a tag resolved. A tag serving only amd64 answers yes, so the arm64 half of the pool could be absent from `latest` while the release, the CI-image wait and the cron picker all reported the images present. `architectures.sh` answers the narrower question instead: given a reference, which architectures must it serve that it does not. It subtracts the manifest index's platforms from `resolve_architectures()`, so the pool stays declared in one place and an absent tag and a single-architecture tag give the same answer to every caller. `highest_release_tag.sh` checks `latest` before it walks the version tags. The published install instructions name the image without a tag, so a reader pulls `latest`, and only a release of the highest version republishes it: an architecture missing from `latest` is therefore reported as that version missing. Older tags stay an existence check, because their source predates the architecture and no rebuild for it is available. The CI-image wait is handed the run's own architecture list, the same expression the build matrix and the manifest step already read, so it cannot demand more than the run produced. The two release workflows pass no list and therefore require the whole pool, which is what drives the rebuild. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Env:
|
|
# REGISTRY, OWNER, REPO_PREFIX, CI_TAG, INFINITO_DISTROS, IMAGE_ARCHITECTURES
|
|
# image coordinates, as scripts/meta/resolve/missing/ci_images.sh reads them
|
|
# WAIT_ATTEMPTS polls before giving up (default 60)
|
|
# WAIT_SLEEP_SECONDS seconds between polls (default 10)
|
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
resolver="${script_dir}/../resolve/missing/ci_images.sh"
|
|
|
|
wait_attempts="${WAIT_ATTEMPTS:-60}"
|
|
wait_sleep_seconds="${WAIT_SLEEP_SECONDS:-10}"
|
|
|
|
echo "⏳ Waiting for the CI images tagged ${CI_TAG:?}"
|
|
|
|
for attempt in $(seq 1 "${wait_attempts}"); do
|
|
if ! still_missing="$(bash "${resolver}")"; then
|
|
echo "❌ Could not check the CI images; see the resolver's output above." >&2
|
|
exit 2
|
|
fi
|
|
|
|
if [[ "${still_missing}" == "false" ]]; then
|
|
echo "✅ Every CI image is available."
|
|
exit 0
|
|
fi
|
|
|
|
echo " attempt ${attempt}/${wait_attempts}: still incomplete"
|
|
sleep "${wait_sleep_seconds}"
|
|
done
|
|
|
|
echo "❌ Gave up after ${wait_attempts} attempts." >&2
|
|
exit 1
|