diff options
author | Vincent Ambo <mail@tazj.in> | 2022-06-02T17·51+0000 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-06-06T12·02+0000 |
commit | b9c31d665822b07ff1fc74ae01d9c164571b3ecd (patch) | |
tree | 3d10119e27434f13ba8f0c62ff369d2c5772edc7 /nix/buildkite/default.nix | |
parent | df83e3d556f3cf99c26f0e9059607d4c5f90a4f0 (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>
Diffstat (limited to 'nix/buildkite/default.nix')
-rw-r--r-- | nix/buildkite/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
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 [ ]); }; |