mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +00:00
examples-lnl: add hydra utils
This commit is contained in:
parent
36ba568fc4
commit
11b0d93c4e
1 changed files with 16 additions and 0 deletions
|
@ -234,6 +234,22 @@
|
||||||
nix-repl '<nixpkgs/lib>' ''${@:-<nixpkgs>}
|
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() {
|
reexec() {
|
||||||
unset __ETC_ZSHRC_SOURCED
|
unset __ETC_ZSHRC_SOURCED
|
||||||
unset __ETC_ZSHENV_SOURCED
|
unset __ETC_ZSHENV_SOURCED
|
||||||
|
|
Loading…
Add table
Reference in a new issue