mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 18:20:07 +01:00
fix(nixfmt) Formatted modified files to default style
The style of files modified in this branch has been corrected.
This commit is contained in:
parent
fc79dd5120
commit
d8e55a05b2
2 changed files with 121 additions and 107 deletions
|
|
@ -11,28 +11,32 @@ in
|
|||
pipelineName,
|
||||
nixConfig,
|
||||
}:
|
||||
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)
|
||||
// (let
|
||||
variables = job.variables or {} //
|
||||
optionalAttrs nixConfig.enableRunnerCache {
|
||||
NIX_CI_CACHE_STRATEGY = "runner";
|
||||
};
|
||||
in
|
||||
# filter empty variables
|
||||
optionalAttrs (variables != {}) {
|
||||
inherit variables;
|
||||
})
|
||||
// (let
|
||||
cache = (toList (job.cache or [])) ++
|
||||
(optional nixConfig.enableRunnerCache {
|
||||
key = nixConfig.runnerCacheKey;
|
||||
paths = [ ".nix-cache/" ];
|
||||
});
|
||||
in
|
||||
# filter empty cache
|
||||
optionalAttrs (cache != []) {
|
||||
inherit cache;
|
||||
})
|
||||
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)
|
||||
// (let
|
||||
variables =
|
||||
job.variables or {}
|
||||
// optionalAttrs nixConfig.enableRunnerCache {
|
||||
NIX_CI_CACHE_STRATEGY = "runner";
|
||||
};
|
||||
in
|
||||
# filter empty variables
|
||||
optionalAttrs (variables != {}) {
|
||||
inherit variables;
|
||||
})
|
||||
// (let
|
||||
cache =
|
||||
(toList (job.cache or []))
|
||||
++ (optional nixConfig.enableRunnerCache {
|
||||
key = nixConfig.runnerCacheKey;
|
||||
paths = [".nix-cache/"];
|
||||
});
|
||||
in
|
||||
# filter empty cache
|
||||
optionalAttrs (cache != []) {
|
||||
inherit cache;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue