mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
Merge pull request #7 from zimbatm/write-json
make JSON writing optional
This commit is contained in:
commit
9acf125f74
1 changed files with 8 additions and 2 deletions
10
default.nix
10
default.nix
|
|
@ -47,7 +47,8 @@ let
|
|||
buildResources = {
|
||||
configuration ? {},
|
||||
resourceFilter ? groupName: name: resource: true,
|
||||
withDependencies ? true
|
||||
withDependencies ? true,
|
||||
writeJSON ? true
|
||||
}: let
|
||||
evaldConfiguration = evalKubernetesModules configuration;
|
||||
|
||||
|
|
@ -96,7 +97,12 @@ let
|
|||
metadata.labels."kubenix/build" = listHash;
|
||||
}) kubernetesList.items;
|
||||
};
|
||||
in pkgs.writeText "resources.json" (builtins.toJSON hashedList);
|
||||
|
||||
result = if writeJSON then
|
||||
pkgs.writeText "resources.json" (builtins.toJSON hashedList)
|
||||
else hashedList;
|
||||
in
|
||||
result;
|
||||
|
||||
buildTest = test: version: buildResources {
|
||||
configuration = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue