mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 17:50:08 +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
|
|
@ -11,13 +11,13 @@ in
|
|||
pipelineName,
|
||||
nixConfig,
|
||||
}:
|
||||
(builtins.removeAttrs job ["variables" "cache"])
|
||||
// (optionalAttrs nixConfig.enable (
|
||||
(prependToBeforeScript ["source setup_nix_ci \"gitlab-ci:pipeline:${pipelineName}:job-deps:${key}\""] job)
|
||||
if ! nixConfig.enable
|
||||
then job
|
||||
else
|
||||
(builtins.removeAttrs job ["variables" "cache"])
|
||||
// (prependToBeforeScript ["source setup_nix_ci \"gitlab-ci:pipeline:${pipelineName}:job-deps:${key}\""] job)
|
||||
// (appendToAfterScript ["finalize_nix_ci"] job)
|
||||
))
|
||||
// optionalAttrs nixConfig.enable (
|
||||
(let
|
||||
// (let
|
||||
variables =
|
||||
(filterJobVariables false job)
|
||||
// optionalAttrs nixConfig.enableRunnerCache {
|
||||
|
|
@ -40,4 +40,3 @@ in
|
|||
optionalAttrs (cache != []) {
|
||||
inherit cache;
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue