diff --git a/pipeline/build_container.sh b/pipeline/build_container.sh index 885c4f0..cc67f71 100644 --- a/pipeline/build_container.sh +++ b/pipeline/build_container.sh @@ -49,8 +49,8 @@ for dir in containers/*/; do BUILD_PLATFORM="" MULTISTAGE="" if [ -f "$PLATFORM_CONF" ]; then - BUILD_PLATFORM=$(grep -E '^[[:space:]]*platform[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]') - MULTISTAGE=$(grep -E '^[[:space:]]*multistage[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]') + BUILD_PLATFORM=$(grep -E '^[[:space:]]*platform[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true) + MULTISTAGE=$(grep -E '^[[:space:]]*multistage[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true) if [ -n "$BUILD_PLATFORM" ]; then echo "platform.conf trovato in $dir: uso platform=$BUILD_PLATFORM" else @@ -68,7 +68,7 @@ for dir in containers/*/; do for ((target_index = 1; target_index <= BUILD_COUNT; target_index++)); do BUILD_TARGET="" if [ -n "$MULTISTAGE" ]; then - BUILD_TARGET=$(grep -E "^[[:space:]]*target${target_index}[[:space:]]*=" "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]') + BUILD_TARGET=$(grep -E "^[[:space:]]*target${target_index}[[:space:]]*=" "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true) if [ -z "$BUILD_TARGET" ]; then echo "target${target_index} non valorizzato in $PLATFORM_CONF" exit 1