REST API to create, branch and run a plan.

Rafer Gluyas February 22, 2022

I'd like to use git hooks (pre-push) to trigger a build on bamboo, but using specific branch and repository that it would get from the call. I've got the draft of that working, however it isn't clear to me if I can create a plan from a specified repo, create a branch on that plan, and then run the plan, all from the REST API.

This is related to https://community.atlassian.com/t5/Bamboo-questions/How-can-i-create-and-run-plan-branch-by-rest-api/qaq-p/1262969 however that only touches on what I'm trying to achieve, and it doesn't have a satistactory answer either

1 answer

1 accepted

1 vote
Answer accepted
Joshua Bremer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 19, 2022

For anyone who stumbles across this, I found something that worked for me.

 

curl -k \
--user "username:password" \
-X POST \
-d "stage&executeAllStages" \
https://bamboo.dexcom.com/rest/api/latest/queue/PD-C8S8769

 

Credit goes to here: http://www.rndblog.com/bamboo-rest-api-how-to-trigger-a-plan-and-waiting-for-a-result/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events