about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorJean-François Roche <jfroche@affinitic.be>2022-07-22T22·47+0200
committerJean-François Roche <jfroche@affinitic.be>2022-07-25T09·29+0000
commit45c794f1b3febc2893afb7da359ddc2e981def34 (patch)
tree1777bff7e09755877f7ca8f5163b0620a9c14e0e /nix
parentb9d79109ddadc83e7062e52d0944c8b73f00a98e (diff)
feat(ops/buildkite): Allow agents targeting r/4321
Using the `agents` attribute, it lets the user target specific agents to run a step.

Change-Id: Id6fc0981d4879b77598854e1f296dffffb33a405
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5974
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'nix')
-rw-r--r--nix/buildkite/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix
index ac349f2bd5..078b91094d 100644
--- a/nix/buildkite/default.nix
+++ b/nix/buildkite/default.nix
@@ -324,6 +324,7 @@ rec {
       # TODO(tazjin): Turn into hard-failure after 2022-10-01.
     , postBuild ? null
     , skip ? false
+    , agents ? null
     }:
     let
       parent = overridableParent parentOverride;
@@ -348,7 +349,8 @@ rec {
         needsOutput
         parent
         parentLabel
-        skip;
+        skip
+        agents;
 
       # //nix/buildkite is growing a new feature for adding different
       # "build phases" which supersedes the previous `postBuild`
@@ -407,7 +409,7 @@ rec {
           echo '+++ Running extra step command'
           exec ${cfg.command}
         '';
-      };
+      } // (lib.optionalAttrs (cfg.agents != null) { inherit (cfg) agents; });
     in
     if (isString cfg.prompt)
     then