mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-12 02:28:20 +02:00
Use travis_wait for sleep
This commit is contained in:
parent
1bbb86eab5
commit
c316c040c5
@ -12,16 +12,8 @@ containers=(
|
|||||||
front
|
front
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verbose sleep, to prevent Travis to cancel the build
|
# Time to sleep in minutes after starting the containers
|
||||||
# First argument is desired sleep time in minutes
|
WAIT=1
|
||||||
v_sleep() {
|
|
||||||
COUNT=$1
|
|
||||||
until [ $COUNT -eq 0 ]; do
|
|
||||||
echo "Sleep for $COUNT more minutes"
|
|
||||||
sleep 1m
|
|
||||||
((COUNT--))
|
|
||||||
done;
|
|
||||||
}
|
|
||||||
|
|
||||||
containers_check() {
|
containers_check() {
|
||||||
status=0
|
status=0
|
||||||
@ -56,8 +48,8 @@ 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
|
||||||
echo "\n" # Clean terminal distortion from docker-compose in travis
|
echo -e "\nSleeping for ${WAIT} minutes" # Clean terminal distortion from docker-compose in travis
|
||||||
v_sleep 1
|
travis_wait sleep ${WAIT}m || sleep ${WAIT}m #Fallback sleep for local run
|
||||||
container_logs
|
container_logs
|
||||||
containers_check || die 1
|
containers_check || die 1
|
||||||
clean
|
clean
|
||||||
|
Loading…
Reference in New Issue
Block a user