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 <eugene.zemtsov@gmail.com>
This commit is contained in:
parent
df83e3d556
commit
b9c31d6658
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ rec {
|
|||
map (mkExtraStep buildEnabled) steps)
|
||||
splitExtraSteps;
|
||||
in
|
||||
extraSteps // {
|
||||
if !buildEnabled then extraSteps
|
||||
else extraSteps // {
|
||||
build = [ step ] ++ (extraSteps.build or [ ]);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue