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 = ''
|
postStart = ''
|
||||||
until ${pkgs.curl.bin}/bin/curl -s -L --fail --head http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} >/dev/null; do
|
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 2
|
sleep 1
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user