39 lines
1.1 KiB
Bash
Raw Normal View History

2018-12-27 13:16:30 +01:00
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
COMPOSEPATH="${SCRIPTPATH}/../../"
CONTAINER="$( cd "${COMPOSEPATH}" && docker-compose ps -q php )"
#FILES="$()"
cd "${COMPOSEPATH}" && docker-compose exec -T php bash -c "find /startup.1.d/*.sh-example -type f -print0 2>/dev/null" \
2018-12-27 13:16:30 +01:00
| xargs -0 -n 1 echo \
| while read f; do
echo "# ----------------------------------------------------------------------------------------"
echo "# [TEST] ${f}"
echo "# ----------------------------------------------------------------------------------------"
2018-12-27 13:46:31 +01:00
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
2018-12-27 13:16:30 +01:00
sleep 5
2018-12-27 13:46:31 +01:00
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
2018-12-27 13:16:30 +01:00
sleep 5
2018-12-27 13:46:31 +01:00
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
2018-12-27 13:16:30 +01:00
sleep 5
2018-12-27 13:46:31 +01:00
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
2018-12-27 13:16:30 +01:00
sleep 5
2018-12-27 13:46:31 +01:00
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
2018-12-27 13:16:30 +01:00
echo "[FAIl] ${f}"
exit 1
fi
fi
fi
fi
fi
echo "[OK] ${f}"
echo
echo
done