mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue