jenkins module: Check for 200 & 403 response codes
The new jenkins version shows a setup wizard on first startup that will throw a 403 HTTP response code instead of 200.
This commit is contained in:
parent
4a3a92d5c8
commit
939c80c26f
|
@ -161,8 +161,8 @@ in {
|
|||
'';
|
||||
|
||||
postStart = ''
|
||||
until ${pkgs.curl.bin}/bin/curl -s -L --fail --head http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} >/dev/null; do
|
||||
sleep 2
|
||||
until [[ $(${pkgs.curl.bin}/bin/curl -s --head -w '\n%{http_code}' http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} | tail -n1) =~ ^(200|403)$ ]]; do
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in New Issue