From 210ce537dd07af8cb15e8d8b91fc1b3023972f95 Mon Sep 17 00:00:00 2001 From: pi-farm Date: Sun, 28 Sep 2025 13:24:37 +0200 Subject: [PATCH] edit function build_image --- scripts/image-builder.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/image-builder.sh b/scripts/image-builder.sh index 3d49d89..9f19de3 100755 --- a/scripts/image-builder.sh +++ b/scripts/image-builder.sh @@ -598,23 +598,23 @@ EOF # Projektparameter laden load_project_config() { - #project="$1" - config_file="$1" + local config_file="$1" if [[ -f "$config_file" ]]; then - echo "Lade Konfiguration für Projekt: $project" + echo "Lade Konfiguration aus $config_file" image_name=$(grep "^image_name=" "$config_file" | cut -d= -f2) dockerfile=$(grep "^dockerfile=" "$config_file" | cut -d= -f2) context=$(grep "^context=" "$config_file" | cut -d= -f2) version=$(grep "^version=" "$config_file" | cut -d= -f2) architectures=$(grep "^architectures=" "$config_file" | cut -d= -f2) - registries=$(grep "^registries=" "$config_file" | cut -d= -f2) + registry=$(grep "^registry=" "$config_file" | cut -d= -f2) + push=$(grep "^push=" "$config_file" | cut -d= -f2) + latest=$(grep "^latest=" "$config_file" | cut -d= -f2) + auto_subversion=$(grep "^auto_subversion=" "$config_file" | cut -d= -f2) - # Architekturen vereinheitlichen → Kommata in Leerzeichen umwandeln architectures="${architectures//,/ }" - # Mehrfache Leerzeichen säubern architectures=$(echo "$architectures" | xargs) - echo "Geladene Konfiguration: image_name=$image_name, dockerfile=$dockerfile, context=$context, version=$version, architectures=$architectures, registries=$registries" + echo "Geladen: image=$image_name, version=$version, archs=$architectures, registry=$registry" else echo "Konfigurationsdatei $config_file nicht gefunden!" exit 1 @@ -622,6 +622,7 @@ load_project_config() { } + # Gibt die URL einer Registry anhand des Config-Files zurück get_registry_url() { local reg=$1