From d2f8a7067543246ce5219c478d855d17baa7e60c Mon Sep 17 00:00:00 2001 From: Skryta Istota <6970043-hidden-being@users.noreply.gitlab.com> Date: Sun, 30 Nov 2025 12:33:55 +0100 Subject: [PATCH] fix(jobPatched) Removed too frequent filtering of variables Removed excessive disposal of environment variables containing paths to nix store package files, plus improved tests for this functionality. --- lib/impl/jobPatched.nix | 7 +++---- tests/cilib_test.nix | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/impl/jobPatched.nix b/lib/impl/jobPatched.nix index c7134fb..4f2ddbd 100644 --- a/lib/impl/jobPatched.nix +++ b/lib/impl/jobPatched.nix @@ -3,7 +3,7 @@ helpers, }: let inherit (lib) toList optionalAttrs optional; - inherit (helpers) prependToBeforeScript appendToAfterScript filterJobVariables; + inherit (helpers) prependToBeforeScript appendToAfterScript; in { key, @@ -18,9 +18,8 @@ in )) // optionalAttrs nixConfig.enable ( (let - variables = - (filterJobVariables false job) - // optionalAttrs nixConfig.enableRunnerCache { + variables = job.variables or {} // + optionalAttrs nixConfig.enableRunnerCache { NIX_CI_CACHE_STRATEGY = "runner"; }; in diff --git a/tests/cilib_test.nix b/tests/cilib_test.nix index fe041df..fea9dae 100644 --- a/tests/cilib_test.nix +++ b/tests/cilib_test.nix @@ -88,7 +88,7 @@ after_script = [ "finalize_nix_ci" ]; before_script = [ "source setup_nix_ci \"gitlab-ci:pipeline:test:job-deps:test\"" ]; variables = { - #BASH = toString pkgs.bash; + BASH = toString pkgs.bash; TEST = "work"; }; cache = [{ @@ -129,7 +129,7 @@ }]; variables = { NIX_CI_CACHE_STRATEGY = "runner"; - #BASH = toString pkgs.bash; + BASH = toString pkgs.bash; TEST = "work"; }; }; @@ -264,7 +264,7 @@ }]; variables = { SAMPLE = "working"; - #HELLO = toString pkgs.hello; + HELLO = toString pkgs.hello; NIX_CI_CACHE_STRATEGY = "runner"; }; };