mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/jenkins: ensure postStart follows redirects
Pass the -L flag to curl to make it follow redirects. This fixes an issue I found when setting up reverse proxy for Jenkins. Without this fix, the returned HTTP code was stuck at 302, making postStart fail the service (it expects 200 or 403).
This commit is contained in:
parent
0e93b0e9ac
commit
5de8f99f03
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ in {
|
|||
'';
|
||||
|
||||
postStart = ''
|
||||
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
|
||||
until [[ $(${pkgs.curl.bin}/bin/curl -L -s --head -w '\n%{http_code}' http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} | tail -n1) =~ ^(200|403)$ ]]; do
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue