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 <tazjin@tvl.su>
This commit is contained in:
parent
b9d79109dd
commit
45c794f1b3
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue