1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Wait if error 502

This commit is contained in:
Pierre Bourré 2019-01-06 14:15:54 +01:00
parent e42db37a2b
commit 4bf6ffcf3f
2 changed files with 20 additions and 2 deletions

View file

@ -121,5 +121,14 @@ systemctl reload nginx
#Fix for the CI #Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ; if sudo grep -qa container=lxc /proc/1/environ;
then then
sleep 60; status_code=$(curl -s -o /dev/null -w '%{http_code}' "$domain${path_url%/}")
inc=0
# Have to wait the time that gitlab reload
while [ $status_code == "502" ] || [ $inc > 10 ]
do
sleep 10;
status_code=$(curl -s -o /dev/null -w '%{http_code}' "$domain${path_url%/}")
((inc++))
done;
fi; fi;

View file

@ -99,5 +99,14 @@ systemctl reload nginx
#Fix for the CI #Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ; if sudo grep -qa container=lxc /proc/1/environ;
then then
sleep 60; status_code=$(curl -s -o /dev/null -w '%{http_code}' "$domain${path_url%/}")
inc=0
# Have to wait the time that gitlab reload
while [ $status_code == "502" ] || [ $inc > 10 ]
do
sleep 10;
status_code=$(curl -s -o /dev/null -w '%{http_code}' "$domain${path_url%/}")
((inc++))
done;
fi; fi;