From 45c794f1b3febc2893afb7da359ddc2e981def34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Sat, 23 Jul 2022 00:47:21 +0200 Subject: [PATCH] feat(ops/buildkite): Allow agents targeting 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 --- nix/buildkite/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix index ac349f2bd..078b91094 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