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