edit function build_image

This commit is contained in:
2025-09-28 13:24:37 +02:00
parent 444f5825b1
commit 210ce537dd

View File

@@ -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