mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2026-06-19 08:39:26 +02:00
fix: pipelines can have either trigger or script
They canno thave both, so here I add assertions support and use them to avoid this case.
This commit is contained in:
parent
097f775cff
commit
70dc878112
8 changed files with 107 additions and 19 deletions
|
|
@ -16,14 +16,20 @@ args: let
|
|||
} (builtins.readFile ./VERSION);
|
||||
|
||||
mkCI = config:
|
||||
(evalModules {
|
||||
modules = [
|
||||
cilib.modules.nixCiSubmodule
|
||||
{
|
||||
inherit config;
|
||||
}
|
||||
];
|
||||
}).config;
|
||||
let
|
||||
result = (evalModules {
|
||||
modules = [
|
||||
cilib.modules.nixCiSubmodule
|
||||
{
|
||||
inherit config;
|
||||
}
|
||||
];
|
||||
}).config;
|
||||
# Check all assertions and warnings using NixOS infrastructure,
|
||||
# then return the result with internal module options removed
|
||||
checked = lib.asserts.checkAssertWarn result.assertions result.warnings result;
|
||||
in
|
||||
builtins.removeAttrs checked ["assertions" "warnings" "config"];
|
||||
};
|
||||
in
|
||||
cilib
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue