mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 01:30:08 +01:00
fix(modules/job): fix variables with nix store paths getting dropped
This commit is contained in:
parent
59f8bd169a
commit
1e9ddff300
2 changed files with 22 additions and 1 deletions
|
|
@ -646,8 +646,8 @@ in rec {
|
|||
};
|
||||
depsDrv = cilib.mkJobDeps {
|
||||
key = name;
|
||||
job = config.finalConfig;
|
||||
nixConfig = config.nix;
|
||||
inherit job;
|
||||
};
|
||||
runnerDrv = cilib.mkJobRun {
|
||||
key = name;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,27 @@
|
|||
assert_file_contains ${package} '"EXAMPLE":"/nix/store/.*-hello-.*"'
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "correctly inject variables containing nix store paths at runtime";
|
||||
type = "script";
|
||||
script = let
|
||||
package =
|
||||
(cilib.mkCI {
|
||||
pipelines."test".jobs."test" = {
|
||||
stage = ".pre";
|
||||
variables.EXAMPLE = "${pkgs.hello}";
|
||||
script = [];
|
||||
};
|
||||
}).packages."gitlab-ci:pipeline:test:job-deps:test";
|
||||
in
|
||||
# sh
|
||||
''
|
||||
${ntlib.helpers.path [pkgs.gnugrep]}
|
||||
${ntlib.helpers.scriptHelpers}
|
||||
assert_file_contains ${package} 'export PATH=":$PATH";'
|
||||
assert_file_contains ${package} 'export EXAMPLE="/nix/store/.*-hello-.*"'
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue