Skip to content

Commit 1a101ee

Browse files
dunterovgonchik
authored andcommitted
new method added to stop build which is in progress (#382)
* new method added to stop build which is in progress * polishes
1 parent fb44644 commit 1a101ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

atlassian/bamboo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,15 @@ def execute_build(self, plan_key, stage=None, execute_all_stages=True, custom_re
369369

370370
return self.post(self.resource_url(resource), params=params, headers=headers)
371371

372+
def stop_build(self, plan_key):
373+
"""
374+
Stop the build which is in progress at the moment.
375+
:param plan_key: str TST-BLD
376+
:return: GET request
377+
"""
378+
resource = "/build/admin/stopPlan.action?planKey={}".format(plan_key)
379+
return self.get(path=resource)
380+
372381
""" Comments & Labels """
373382

374383
def comments(self, project_key, plan_key, build_number, start_index=0, max_results=25):

0 commit comments

Comments
 (0)