ci: js -> json, output to stderr
This commit is contained in:
parent
00ff16d540
commit
856c4777d1
@ -27,14 +27,14 @@ let
|
|||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
getJobs = pkgs.writeDash "get_jobs" ''
|
getJobs = pkgs.writeDash "get_jobs" ''
|
||||||
set -efu
|
set -efu
|
||||||
${pkgs.nix}/bin/nix-build --no-out-link --quiet -Q ./ci.nix > /dev/null
|
${pkgs.nix}/bin/nix-build --no-out-link --quiet -Q ./ci.nix >&2
|
||||||
js="$(${pkgs.nix}/bin/nix-instantiate --quiet -Q --eval --strict --json ./ci.nix)"
|
json="$(${pkgs.nix}/bin/nix-instantiate --quiet -Q --eval --strict --json ./ci.nix)"
|
||||||
echo "$js" | ${pkgs.jq}/bin/jq -r 'to_entries[] | [.key, .value] | @tsv' \
|
echo "$json" | ${pkgs.jq}/bin/jq -r 'to_entries[] | [.key, .value] | @tsv' \
|
||||||
| while read -r host builder; do
|
| while read -r host builder; do
|
||||||
gcroot=${shell.escape profileRoot}/$host-builder
|
gcroot=${shell.escape profileRoot}/$host-builder
|
||||||
${pkgs.nix}/bin/nix-env -p "$gcroot" --set "$builder"
|
${pkgs.nix}/bin/nix-env -p "$gcroot" --set "$builder"
|
||||||
done
|
done
|
||||||
echo "$js"
|
echo "$json"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
profileRoot = "/nix/var/nix/profiles/ci";
|
profileRoot = "/nix/var/nix/profiles/ci";
|
||||||
|
Loading…
Reference in New Issue
Block a user