about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorBen Challenor <ben@challenor.org>2018-10-13 09:47:41 +0100
committerBen Challenor <ben@challenor.org>2018-10-13 10:34:26 +0100
commitb6421bfec41c82d46350c9120decf0ca4f533b85 (patch)
treed7da377bdff076be5e342c0efb329153833b0edb /pkgs/development/tools
parentc15006d410d053da4a70e23e1d82d7b9a2928381 (diff)
downloadnixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar.gz
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar.bz2
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar.lz
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar.xz
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.tar.zst
nixlib-b6421bfec41c82d46350c9120decf0ca4f533b85.zip
jenkins: add update script
Diffstat (limited to 'pkgs/development/tools')
-rwxr-xr-xpkgs/development/tools/continuous-integration/jenkins/update.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/tools/continuous-integration/jenkins/update.sh b/pkgs/development/tools/continuous-integration/jenkins/update.sh
new file mode 100755
index 000000000000..e8b6d9257758
--- /dev/null
+++ b/pkgs/development/tools/continuous-integration/jenkins/update.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl common-updater-scripts jq
+
+set -eu -o pipefail
+
+core_json="$(curl --fail --location https://updates.jenkins.io/stable/update-center.actual.json | jq .core)"
+
+version="$(jq -r .version <<<$core_json)"
+sha256="$(jq -r .sha256 <<<$core_json)"
+hash="$(nix-hash --type sha256 --to-base32 "$sha256")"
+url="$(jq -r .url <<<$core_json)"
+
+update-source-version jenkins "$version" "$hash" "$url"