mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
chore(module): slim down pipeline yaml generation even more
This commit is contained in:
parent
7a40a68a10
commit
060d8fad47
1 changed files with 1 additions and 6 deletions
|
|
@ -164,12 +164,7 @@
|
||||||
# NOTE: json is also valid yaml and this removes dependency on jq
|
# NOTE: json is also valid yaml and this removes dependency on jq
|
||||||
# and/or remarshal (used in pkgs.formats.json and pkgs.formats.yaml
|
# and/or remarshal (used in pkgs.formats.json and pkgs.formats.yaml
|
||||||
# respectively)
|
# respectively)
|
||||||
toYaml = name: value:
|
toYaml = name: value: builtins.toFile name (builtins.toJSON value);
|
||||||
pkgs.runCommand name {} ''
|
|
||||||
cat <<'EOT' > $out
|
|
||||||
${builtins.toJSON value}
|
|
||||||
EOT
|
|
||||||
'';
|
|
||||||
mapAttrs = cb: set: builtins.listToAttrs (builtins.map (key: cb key (builtins.getAttr key set)) (builtins.attrNames set));
|
mapAttrs = cb: set: builtins.listToAttrs (builtins.map (key: cb key (builtins.getAttr key set)) (builtins.attrNames set));
|
||||||
prepend = key: arr: job:
|
prepend = key: arr: job:
|
||||||
job
|
job
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue