summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httpserver
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2018-11-28 07:03:19 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2018-12-03 17:07:29 +0100
commit8ebfd5c45cd25e5bce147467c5946eb76ee1d154 (patch)
treee116b8c4cc3090edd3c4d9f6aae57c4de784ed27 /pkgs/development/python-modules/httpserver
parent84a2463499d7e67350277e0f02cdb4412d0262cf (diff)
nixos/jenkins-job-builder: stop reloadScript on error
Currently there are two calls to curl in the reloadScript, neither which check for errors. If something is misconfigured (like wrong authToken), the only trace that something wrong happened is this log message: Asking Jenkins to reload config <h1>Bad Message 400</h1><pre>reason: Illegal character VCHAR='<'</pre> The service isn't marked as failed, so it's easy to miss. Fix it by passing --fail to curl. While at it: * Add $curl_opts and $jenkins_url variables to keep the curl command lines DRY. * Add --show-error to curl to show short error message explanation when things go wrong (like HTTP 401 error). * Lower-case the $CRUMB variable as upper case is for exported environment variables. The new behaviour, when having wrong accessToken: Asking Jenkins to reload config curl: (22) The requested URL returned error: 401 And the service is clearly marked as failed in `systemctl --failed`.
Diffstat (limited to 'pkgs/development/python-modules/httpserver')
0 files changed, 0 insertions, 0 deletions