1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

examples-lnl: add hydra utils

This commit is contained in:
Daiderd Jordan 2017-10-03 00:24:01 +02:00
parent 36ba568fc4
commit 11b0d93c4e
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -234,6 +234,22 @@
nix-repl '<nixpkgs/lib>' ''${@:-<nixpkgs>}
}
hydra-job-revision() {
local jobseteval job=$1
jobseteval=$(curl -fL -H 'Content-Type: application/json' "$job/latest" | jq '.jobsetevals[0]')
curl -f -H 'Content-Type: application/json' "''${job%/job*}/eval/$jobseteval" | jq -r '.jobsetevalinputs.nixpkgs.revision'
}
hydra-job-outputs() {
local job=$1
curl -fL -H 'Content-Type: application/json' "$job/latest" | jq -r '.buildoutputs | to_entries | .[].value.path'
}
hydra-build-log() {
local build=$1
nix log "$(curl -f -H 'Content-Type: application/json' "$build/api/get-info" | jq -r .drvPath)"
}
reexec() {
unset __ETC_ZSHRC_SOURCED
unset __ETC_ZSHENV_SOURCED