mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
fix(jobPatched): handle non-nix jobs correctly
fix mkJobPatched removing `cache` and `variables` from non-nix jobs See !15 for more
This commit is contained in:
parent
1c9e7c77c5
commit
97fb4fafc3
2 changed files with 27 additions and 9 deletions
|
|
@ -64,6 +64,22 @@
|
|||
nixConfig.enable = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "jobPatched nix disabled with variables and cache";
|
||||
expected = {
|
||||
variables."HELLO" = "world";
|
||||
cache = [{key = "example";}];
|
||||
};
|
||||
actual = mkJobPatched {
|
||||
key = "test";
|
||||
pipelineName = "test";
|
||||
job = {
|
||||
variables."HELLO" = "world";
|
||||
cache = [{key = "example";}];
|
||||
};
|
||||
nixConfig.enable = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "jobPatched without runner cache";
|
||||
expected = {
|
||||
|
|
@ -145,10 +161,13 @@
|
|||
'';
|
||||
}
|
||||
{
|
||||
name = "handle store paths in variables";
|
||||
name = "ignore store paths in variables with nix disabled";
|
||||
expected = {
|
||||
stages = ["test"];
|
||||
test.stage = "test";
|
||||
test = {
|
||||
stage = "test";
|
||||
variables."TEST" = "${pkgs.hello}";
|
||||
};
|
||||
};
|
||||
actual =
|
||||
(mkPipeline {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue