Speed up scratch image builds with publish-first contexts

This commit is contained in:
master
2026-03-09 07:37:24 +02:00
parent c9686edf07
commit f218ec82ec
8 changed files with 358 additions and 38 deletions

View File

@@ -280,13 +280,14 @@ build_solutions() {
# ─── 6. Build Docker images ────────────────────────────────────────────────
build_images() {
local publish_no_restore="${1:-false}"
step 'Building Docker images'
local script="${ROOT}/devops/docker/build-all.sh"
if [[ -x "$script" ]]; then
"$script"
PUBLISH_NO_RESTORE="$publish_no_restore" "$script"
ok 'Docker images built successfully'
elif [[ -f "$script" ]]; then
bash "$script"
PUBLISH_NO_RESTORE="$publish_no_restore" bash "$script"
ok 'Docker images built successfully'
else
warn "Build script not found at $script. Skipping image build."
@@ -377,7 +378,7 @@ check_prerequisites
check_hosts
if [[ "$IMAGES_ONLY" == "true" ]]; then
build_images
build_images false
echo ''
echo 'Done (images only).'
exit 0
@@ -398,7 +399,11 @@ if [[ "$SKIP_BUILD" != "true" ]]; then
fi
if [[ "$SKIP_IMAGES" != "true" ]]; then
build_images
if [[ "$SKIP_BUILD" == "true" ]]; then
build_images false
else
build_images true
fi
fi
start_platform