Skip to content

Commit b195cd1

Browse files
committed
test: Allow to add additional commands to prepend
We usually run the CI through the python scripts generating buildkite pipeline steps. To enable to inject custom CPU templates through the python scripts, adds a new command line argument `--additional-prepend` that specifies additional commands to prepend to the generated steps. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 1e4002f commit b195cd1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.buildkite/common.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ def __call__(self, parser, namespace, value, option_string=None):
176176
default=None,
177177
type=str,
178178
)
179+
COMMON_PARSER.add_argument(
180+
"--additional-prepend",
181+
help="Commands to be prepended additionally",
182+
required=False,
183+
nargs="+",
184+
default=[],
185+
type=str,
186+
)
179187

180188

181189
def random_str(k: int):
@@ -288,6 +296,7 @@ def _adapt_group(self, group):
288296
f"chmod -v a+x {self.binary_dir}/**/*",
289297
]
290298
)
299+
prepend.extend(self.args.additional_prepend)
291300

292301
for step in group["steps"]:
293302
step["command"] = prepend + step["command"]

0 commit comments

Comments
 (0)