about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-07-24T08·55+0300
committerclbot <clbot@tvl.fyi>2023-07-24T20·51+0000
commit8b870c7ec91eb85f7e37eba8cffe022067865ab7 (patch)
tree0523fb295b7d3c00d6a679b66b38161a0f5a1154 /nix
parentf41b611761cd7fa88ddfdf922eef7ec789903b81 (diff)
feat(nix/buildkite): add meta.ci.buildkiteExtraStepArgs r/6443
This allows setting / overwriting arbitrary step arguments, such as setting
[Retry attributes](https://buildkite.com/docs/pipelines/command-step#retry-attributes)
for a specific readTree target.

It's intended to be used for cases where modelling each and every option
in a custom meta.ci attribute would be unfeasible.

Change-Id: I3352d5353b26a41a16760a7df37cd5ffee1665bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8983
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'nix')
-rw-r--r--nix/buildkite/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix
index 08be8f38c93d..c53d58eecdae 100644
--- a/nix/buildkite/default.nix
+++ b/nix/buildkite/default.nix
@@ -86,7 +86,9 @@ rec {
       depends_on = [ ":init:" ] ++ lib.optionals (target ? meta.ci.buildkiteExtraDeps) target.meta.ci.buildkiteExtraDeps;
     } // lib.optionalAttrs (target ? meta.timeout) {
       timeout_in_minutes = target.meta.timeout / 60;
-    };
+      # Additional arguments to set on the step.
+      # Keep in mind these *overwrite* existing step args, not extend. Use with caution.
+    } // lib.optionalAttrs (target ? meta.ci.buildkiteExtraStepArgs) target.meta.ci.buildkiteExtraStepArgs;
 
   # Helper function to inelegantly divide a list into chunks of at
   # most n elements.