mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2026-02-02 19:35:08 +01:00
Compare commits
No commits in common. "00cf5b83c6c46698fba12a54b9cc15c6d4e5a4dd" and "31f0e4ea13c182d74121419e9f85312d9242eb46" have entirely different histories.
00cf5b83c6
...
31f0e4ea13
5 changed files with 23 additions and 30 deletions
|
|
@ -1 +1 @@
|
|||
3.0.0-alpha.2
|
||||
3.0.0-alpha.1
|
||||
|
|
|
|||
|
|
@ -11,33 +11,21 @@ in
|
|||
pipelineName,
|
||||
nixConfig,
|
||||
}:
|
||||
(builtins.removeAttrs job ["variables" "cache"])
|
||||
job
|
||||
// (optionalAttrs nixConfig.enable (
|
||||
(prependToBeforeScript ["source setup_nix_ci \"gitlab-ci:pipeline:${pipelineName}:job-deps:${key}\""] job)
|
||||
// (appendToAfterScript ["finalize_nix_ci"] job)
|
||||
))
|
||||
// optionalAttrs nixConfig.enable (
|
||||
(let
|
||||
variables =
|
||||
(filterJobVariables false job)
|
||||
// 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;
|
||||
})
|
||||
)
|
||||
// optionalAttrs nixConfig.enable {
|
||||
variables =
|
||||
(filterJobVariables false job)
|
||||
// optionalAttrs nixConfig.enableRunnerCache {
|
||||
NIX_CI_CACHE_STRATEGY = "runner";
|
||||
};
|
||||
cache =
|
||||
(toList (job.cache or []))
|
||||
++ (optional nixConfig.enableRunnerCache {
|
||||
key = nixConfig.runnerCacheKey;
|
||||
paths = [".nix-cache/"];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ in
|
|||
script = [
|
||||
"nix run .#tests -- --junit=junit.xml"
|
||||
];
|
||||
variables = {
|
||||
"SSL_CERT_FILE" = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
"NIX_SSL_CERT_FILE" = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
};
|
||||
allow_failure = true;
|
||||
artifacts = {
|
||||
when = "always";
|
||||
|
|
|
|||
|
|
@ -148,7 +148,10 @@
|
|||
name = "handle store paths in variables";
|
||||
expected = {
|
||||
stages = ["test"];
|
||||
test.stage = "test";
|
||||
test = {
|
||||
stage = "test";
|
||||
variables."TEST" = "${pkgs.hello}";
|
||||
};
|
||||
};
|
||||
actual =
|
||||
(mkPipeline {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
''
|
||||
${ntlib.helpers.scriptHelpers}
|
||||
${ntlib.helpers.path (with pkgs; [coreutils nix gnused gnugrep jq])}
|
||||
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
export NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
repo_path=${../.}
|
||||
|
||||
cp ${./fixtures/flake_parts}/* .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue