kubenix/release.nix

34 lines
598 B
Nix
Raw Normal View History

let
fetch = import ./lib/compat.nix;
in
{ pkgs ? import (fetch "nixpkgs") { }
, lib ? pkgs.lib
, throwError ? true
}:
2019-03-08 00:39:09 +01:00
with lib;
let
2019-02-12 16:22:18 +01:00
kubenix = import ./. { inherit pkgs; };
lib = kubenix.lib;
2019-05-05 12:13:09 +02:00
runK8STests = k8sVersion: import ./tests {
2021-05-06 16:07:24 -04:00
inherit pkgs lib kubenix k8sVersion throwError nixosPath;
2019-05-05 12:13:09 +02:00
};
in
rec {
2019-05-05 12:13:09 +02:00
tests = {
2021-04-28 21:15:58 -05:00
k8s-1_19 = runK8STests "1.19";
k8s-1_20 = runK8STests "1.20";
k8s-1_21 = runK8STests "1.21";
2019-02-12 16:22:18 +01:00
};
2019-03-07 18:03:51 +01:00
test-check =
2019-05-05 12:13:09 +02:00
if !(all (test: test.success) (attrValues tests))
2019-03-08 00:39:09 +01:00
then throw "tests failed"
else true;
examples = import ./examples { };
}