Skip to content

Commit 47740e4

Browse files
committed
fail github job if test_pull_request fails
1 parent db66656 commit 47740e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/test_pull_request_deployments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def trigger_pipelines(pipeline_ids: dict, service: str):
3232
pipeline_branch=pipeline_ids["branch"]
3333
)
3434
if build_status != "succeeded":
35+
sys.exit(1)
3536
return
3637
azure_dev_ops.run_pipeline(
3738
service=service,
@@ -52,6 +53,11 @@ def main():
5253
jobs.append(process)
5354
for process in jobs:
5455
process.join()
56+
# check return code of jobs and fail if there is a problem
57+
for process in jobs:
58+
if process.exitcode != 0:
59+
print("A job failed")
60+
sys.exit(1)
5561
sys.exit(0)
5662

5763

0 commit comments

Comments
 (0)