Fix bug where an error would cause failure of all subsequent containers.

This commit is contained in:
Stephane Gourichon
2025-08-15 19:06:52 +02:00
parent 91347d4310
commit b32855e3bc

View File

@@ -20,15 +20,19 @@ function fail_one()
bash partials/fsg-image/build.sh
cd service_definitions
SERVICE_DEFINITION_ROOT="$PWD"
while IFS="" read -u 3 -r SERVICE_PATH
do
pushd "${SERVICE_PATH%/*}"
cd "${SERVICE_DEFINITION_ROOT}"
cd "${SERVICE_PATH%/*}"
pwd
podman-compose pull || { fail_one "pull" ; continue ; }
podman-compose build --no-cache || { fail_one "build" ; continue ; }
podman-compose up -d || { fail_one "switch to newly built container" ; continue ; }
popd
done 3< <( find . -iname "compose.yaml" )
echo "Overall result: $RC"