Skip to content

Commit 20a6e0d

Browse files
committed
ci: support several commands in a group
Also allow command templates Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 44cdc07 commit 20a6e0d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.buildkite/common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ def group(label, command, instances, platforms, agent_tags=None, **kwargs):
3232
# Use the 1st character of the group name (should be an emoji)
3333
label1 = label[0]
3434
steps = []
35+
commands = command
36+
if isinstance(command, str):
37+
commands = [command]
3538
for instance in instances:
3639
for (os, kv) in platforms:
40+
# fill any templated variables
41+
step_commands = [cmd.format(instance=instance, os=os, kv=kv)
42+
for cmd in commands]
3743
agents = [f"instance={instance}", f"kv={kv}", f"os={os}"] + agent_tags
3844
step = {
39-
"command": command,
45+
"command": step_commands,
4046
"label": f"{label1} {instance} {os} {kv}",
4147
"agents": agents,
4248
**kwargs,

0 commit comments

Comments
 (0)