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 during CI

This commit is contained in:
Bourre Pierre 2019-01-08 14:52:34 +01:00
parent e4f6f32b47
commit f29dfffc55
2 changed files with 20 additions and 2 deletions

View file

@ -121,5 +121,14 @@ systemctl reload nginx
#Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ;
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 -lt 10 ]
do
sleep 10;
status_code=$(curl -s -o /dev/null -w '%{http_code}' "$domain${path_url%/}")
((inc++))
done;
fi;

View file

@ -99,5 +99,14 @@ systemctl reload nginx
#Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ;
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;