edit function build_image
This commit is contained in:
@@ -598,23 +598,23 @@ EOF
|
|||||||
|
|
||||||
# Projektparameter laden
|
# Projektparameter laden
|
||||||
load_project_config() {
|
load_project_config() {
|
||||||
#project="$1"
|
local config_file="$1"
|
||||||
config_file="$1"
|
|
||||||
if [[ -f "$config_file" ]]; then
|
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)
|
image_name=$(grep "^image_name=" "$config_file" | cut -d= -f2)
|
||||||
dockerfile=$(grep "^dockerfile=" "$config_file" | cut -d= -f2)
|
dockerfile=$(grep "^dockerfile=" "$config_file" | cut -d= -f2)
|
||||||
context=$(grep "^context=" "$config_file" | cut -d= -f2)
|
context=$(grep "^context=" "$config_file" | cut -d= -f2)
|
||||||
version=$(grep "^version=" "$config_file" | cut -d= -f2)
|
version=$(grep "^version=" "$config_file" | cut -d= -f2)
|
||||||
architectures=$(grep "^architectures=" "$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//,/ }"
|
architectures="${architectures//,/ }"
|
||||||
# Mehrfache Leerzeichen säubern
|
|
||||||
architectures=$(echo "$architectures" | xargs)
|
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
|
else
|
||||||
echo "Konfigurationsdatei $config_file nicht gefunden!"
|
echo "Konfigurationsdatei $config_file nicht gefunden!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -622,6 +622,7 @@ load_project_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Gibt die URL einer Registry anhand des Config-Files zurück
|
# Gibt die URL einer Registry anhand des Config-Files zurück
|
||||||
get_registry_url() {
|
get_registry_url() {
|
||||||
local reg=$1
|
local reg=$1
|
||||||
|
|||||||
Reference in New Issue
Block a user