Skip to content

Commit a1be1b2

Browse files
roypatpb8o
authored andcommitted
ci: buildkite pipeline for running non-blocking tests
The new pipeline_pr_no_block.py script generates a pipeline that executes only the non blocking tests. For now, it executes them all in the same step (as there is only a single such test). Later, if we add more non-blocking tests, we can revisit splitting them up similar to what pipeline_no_block.py does. Signed-off-by: Patrick Roy <[email protected]>
1 parent 13519e0 commit a1be1b2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.buildkite/pipeline_pr_no_block.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env python3
2+
# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
"""Generate Buildkite pipelines dynamically"""
6+
7+
from common import COMMON_PARSER, group, pipeline_to_json
8+
9+
# Buildkite default job priority is 0. Setting this to 1 prioritizes PRs over
10+
# scheduled jobs and other batch jobs.
11+
DEFAULT_PRIORITY = 1
12+
13+
args = COMMON_PARSER.parse_args()
14+
15+
defaults = {
16+
"instances": args.instances,
17+
"platforms": args.platforms,
18+
# buildkite step parameters
19+
"timeout_in_minutes": 45,
20+
"env": dict(args.step_env),
21+
# some non-blocking tests are performance, so make sure they get ag=1 instances
22+
"priority": DEFAULT_PRIORITY + 1,
23+
"agent_tags": ["ag=1"],
24+
}
25+
defaults.update(args.step_param)
26+
27+
optional_grp = group(
28+
"❓ Optional",
29+
"./tools/devtool -y test -c 1-10 -m 0 -- ../tests/integration_tests/ -m no_block_pr",
30+
**defaults,
31+
)
32+
33+
pipeline = {"steps": [optional_grp]}
34+
print(pipeline_to_json(pipeline))

0 commit comments

Comments
 (0)