From b9c31d665822b07ff1fc74ae01d9c164571b3ecd Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 2 Jun 2022 17:51:58 +0000 Subject: refactor(nix/buildkite): Optimise steps if builds are not enabled 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 --- nix/buildkite/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix index 5b40fb79b59c..a3e9da956da3 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 [ ]); }; -- cgit 1.4.1