Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to start plan on a specific branch with bamboo API

Dzmitry Mandryk October 14, 2024

 

Hi guys,

Is there any possibility to trigger a build for a specific branch using the Bamboo REST API?

For example, I am retrieving the source branch name from Jira Cloud. What we want is to run certain tasks only when a pull request is opened for a specific branch.

Here is the Bamboo API call I'm considering:

http://bamboo.local.gde/rest/api/latest/queue/SUN-PRT?bamboo.branchName={{pullRequest.sourceBranch}}

1 answer

1 vote
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2024

Hello Dzmitry

Welcome to Atlassian community

1. You can use https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-queue-projectkey-buildkey-post to trigger the build for a specific plan or plan branch

2. To run certain task, you can use conditional variables for a task and pass the branch name, refer https://confluence.atlassian.com/bamkb/conditional-tasks-in-bamboo-1077907046.html for more details.

Regards,

Shashank kumar

**please don't forget to Accept the answer if your query was answered**

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events