about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-06-02T17·51+0000
committertazjin <tazjin@tvl.su>2022-06-06T12·02+0000
commitb9c31d665822b07ff1fc74ae01d9c164571b3ecd (patch)
tree3d10119e27434f13ba8f0c62ff369d2c5772edc7
parentdf83e3d556f3cf99c26f0e9059607d4c5f90a4f0 (diff)
refactor(nix/buildkite): Optimise steps if builds are not enabled r/4222
Generating a release-only pipeline skips a bigger chunk of eval this
way (the step itself is never actually evaluated, which means we never
actually compute the drv), which can be quite beneficial in terms of
evaluation time.

Change-Id: I2739026ddd1c6a86f82627ac26a046c5fe7359ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5830
Tested-by: BuildkiteCI
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
-rw-r--r--nix/buildkite/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix
index 5b40fb79b..a3e9da956 100644
--- a/nix/buildkite/default.nix
+++ b/nix/buildkite/default.nix
@@ -191,7 +191,8 @@ rec {
               map (mkExtraStep buildEnabled) steps)
             splitExtraSteps;
         in
-        extraSteps // {
+        if !buildEnabled then extraSteps
+        else extraSteps // {
           build = [ step ] ++ (extraSteps.build or [ ]);
         };