43 lines
868 B
Bash
Executable File
43 lines
868 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
set -xv
|
|
|
|
cd -P "$(dirname "$(readlink -f "$0")" )"
|
|
|
|
cd ..
|
|
|
|
INFRA_ROOT="$PWD"
|
|
|
|
RC=0
|
|
|
|
function fail_one()
|
|
{
|
|
echo >&2 "FAILURE on: " "$@"
|
|
RC=$(( RC + 1 ))
|
|
}
|
|
|
|
bash partials/fsg-image/build.sh
|
|
|
|
cd service_definitions
|
|
|
|
SERVICE_DEFINITION_ROOT="$PWD"
|
|
|
|
while IFS="" read -u 3 -r SERVICE_PATH
|
|
do
|
|
cd "${SERVICE_DEFINITION_ROOT}"
|
|
cd "${SERVICE_PATH%/*}"
|
|
pwd
|
|
podman-compose pull || { fail_one "pull" ; continue ; }
|
|
podman-compose build || { fail_one "build" ; continue ; }
|
|
podman-compose down || { fail_one "down" ; continue ; }
|
|
podman-compose up -d || { fail_one "switch to newly built container" ; continue ; }
|
|
|
|
bash test_unit.sh || { fail_one "unit test" ; }
|
|
bash test_acceptance.sh || { fail_one "acceptance test" ; continue ; }
|
|
done 3< <( find . -iname "compose.yaml" )
|
|
|
|
echo "Overall result: $RC"
|
|
exit "$RC"
|