mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
improve ci
This commit is contained in:
parent
7e7eb19e94
commit
12a6b509a4
2 changed files with 11 additions and 9 deletions
3
ci.nix
3
ci.nix
|
|
@ -6,7 +6,6 @@ let
|
|||
|
||||
release = import ./release.nix {
|
||||
inherit pkgs lib;
|
||||
e2e = false;
|
||||
nixosPath = "${nixpkgsSrc}/nixos";
|
||||
};
|
||||
in with lib; release.tests
|
||||
in pkgs.recurseIntoAttrs release
|
||||
|
|
|
|||
17
release.nix
17
release.nix
|
|
@ -19,11 +19,9 @@ let
|
|||
inherit (pkgs) lib;
|
||||
};
|
||||
|
||||
runK8STests = k8sVersion: pkgs.recurseIntoAttrs (getAttrs ["result" "results" "success"]
|
||||
(import ./tests {
|
||||
inherit pkgs lib kubenix k8sVersion e2e throwError nixosPath;
|
||||
})
|
||||
);
|
||||
runK8STests = k8sVersion: import ./tests {
|
||||
inherit pkgs lib kubenix k8sVersion e2e throwError nixosPath;
|
||||
};
|
||||
in rec {
|
||||
generate.k8s = pkgs.linkFarm "k8s-generated.nix" [{
|
||||
name = "v1.7.nix";
|
||||
|
|
@ -88,7 +86,7 @@ in rec {
|
|||
path = generateIstio;
|
||||
}];
|
||||
|
||||
tests = pkgs.recurseIntoAttrs {
|
||||
tests = {
|
||||
k8s-1_7 = runK8STests "1.7";
|
||||
k8s-1_8 = runK8STests "1.8";
|
||||
k8s-1_9 = runK8STests "1.9";
|
||||
|
|
@ -98,8 +96,13 @@ in rec {
|
|||
k8s-1_13 = runK8STests "1.13";
|
||||
};
|
||||
|
||||
test-results = pkgs.recurseIntoAttrs (mapAttrs (_: t: pkgs.recurseIntoAttrs {
|
||||
results = pkgs.recurseIntoAttrs t.results;
|
||||
result = t.result;
|
||||
}) tests);
|
||||
|
||||
test-check =
|
||||
if !(all (test: if isAttrs test then test.success else true) (attrValues tests))
|
||||
if !(all (test: test.success) (attrValues tests))
|
||||
then throw "tests failed"
|
||||
else true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue