nixpkgs/nixos/modules
Bjørn Forsman 8ebfd5c45c 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`.
2018-12-03 17:07:29 +01:00
..
config Merge pull request #36424 from jfrankenau/i18n-extra-locale 2018-11-29 16:22:34 +01:00
hardware nixos/hpsa: use https 2018-11-24 23:05:10 +01:00
i18n/input-method docs: format 2018-09-29 20:51:11 -04:00
installer iso-image: Do not use batch operations for mcopy. 2018-11-28 19:14:54 -05:00
misc nixos/cockroachdb: create new service 2018-12-01 19:07:49 -06:00
profiles Revert "zfs cannot be distributed. Disabling it in the isos." 2018-11-26 17:51:18 -05:00
programs Merge pull request #51316 from primeos/sway 2018-12-02 22:03:31 +01:00
security nixos/rngd: do not pass --version flag 2018-11-05 10:41:38 +01:00
services nixos/jenkins-job-builder: stop reloadScript on error 2018-12-03 17:07:29 +01:00
system Revert "nixos/luksroot: Check whether the device already exists" 2018-12-02 17:27:35 +00:00
tasks nixos: move system.autoUpgrade 2018-11-17 14:05:30 +01:00
testing Add ssh backdoor to VM tests infrastructure. 2018-09-28 10:53:08 +01:00
virtualisation nixos/containers: simplify env var definition 2018-11-26 23:06:56 +01:00
module-list.nix Merge pull request #48423 from charles-dyfis-net/bees 2018-12-02 18:38:47 +01:00
rename.nix ckb-next: move option renames to nixos/modules/rename.nix for consistency 2018-11-06 00:50:00 +00:00