Commit e8266a25 authored by Malte Lau Petersen's avatar Malte Lau Petersen

Follow redirects when waiting for CI/CD to finish

When gitlab is set to "Force domains with SSL certificates to use
HTTPS", visiting the domain on http leads to a "HTTP/1.1 301 Moved
Permanently". This commit tells curl to follow the redirect and awk
only reads the last response (not the 301)
parent 1c862f18
......@@ -28,7 +28,7 @@ git push
## waiting for CI/CD publishing to happen
while true; do
resp=`curl -s -I "http://${CERTBOT_DOMAIN}${CertPath}${CERTBOT_TOKEN}" | grep HTTP | awk '{print $2 }'`
resp=`curl -L -s -I "http://${CERTBOT_DOMAIN}${CertPath}${CERTBOT_TOKEN}" | grep HTTP | awk 'END{print $2 }'`
if [ "${resp}" = "200" ]; then
break
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment