Minor script flow restructure

master
Tim Möhlmann 6 years ago
parent 42f557ff38
commit 59eb4a5a00
No known key found for this signature in database
GPG Key ID: AFABC30066A39335

@ -18,11 +18,13 @@ if [ -z "$DOCKER_ORG" ]; then
fi fi
containers_check() { containers_check() {
sleep 1m
STATUS=0 STATUS=0
for container in "${containers[@]}"; do for container in "${containers[@]}"; do
echo "Checking ${DOCKER_ORG}_${container}" echo "Checking ${DOCKER_ORG}_${container}"
docker inspect "${DOCKER_ORG}_${container}" | grep '"Status": "running"' || STATUS=1 docker inspect "${DOCKER_ORG}_${container}" | grep '"Status": "running"' || STATUS=1
done done
docker ps -a
return $STATUS return $STATUS
} }
@ -47,8 +49,6 @@ die() {
for file in tests/compose/*.env ; do for file in tests/compose/*.env ; do
cp $file .env cp $file .env
docker-compose -f tests/compose/run.yml -p $DOCKER_ORG up -d docker-compose -f tests/compose/run.yml -p $DOCKER_ORG up -d
sleep 1m
docker ps -a
container_logs container_logs
containers_check || die 1 containers_check || die 1
clean clean

Loading…
Cancel
Save