Bamboo build trigger from JIRA

Divya Rohidas March 22, 2018

Hi Team,

The requirement is to trigger a Bamboo build with any update in actions in JIRA(Ex: Issue Update or comment update)

 We have followed the approach below:

  • Connected JIRA with Bamboo using a webhook.
  • We are trying various webhook URL’s but the trigger of Bamboo build is not successful.

 Kindly suggest if anyone has worked on similar approach.

 

4 answers

1 accepted

1 vote
Answer accepted
Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 1, 2018

Hi Divya,

Just to close the loop after assisting you internally via support ticket,

this cURL command triggers a new build as explained in this page.

curl -X POST http://host:port/rest/api/latest/queue/PLAN-KEY?os_authType=basic --user username:password

You may have to disable "Enable XSRF protection" option in Overview -> Security settings for this to execute successfully.

To use it within a JIRA workflow, use it in this format for the webhook URL.

http://yourusername:yourpasswd@bamboo-host:8085/rest/api/latest/queue/PLAN-KEY?os_authType=basic

 Note: When configuring Webhook, the Exclude body checkbox MUST be checked.

Glad it helped.

Mahesh Pawar January 30, 2019

Hi @Jeyanthan Inbasekaran 

Thanks for info.

but my query is that , i want to pass some Jira fields like issue.key, project.key, project.id etc. to bamboo as well

can you help me out.

possibly like this

http://yourusername:yourpasswd@bamboo-host:8085/rest/api/latest/queue/PLAN-KEY?os_authType=basic&myid={$issue.key}&pid=${project.id}

  

Mahesh Pawar January 31, 2019

using above webhook bamboo is getting triggered.But the values[echo ${myid}, ] while printing in bamboo is coming empty.

0 votes
Haresh Perera August 23, 2019

Is there any way to trigger API post call with Ansible ...

0 votes
Malentaqui May 15, 2018

Is there any plugin to do that? or any other easier way?

0 votes
Divya Rohidas April 3, 2018

Hi Jey,

Iam able to trigger the build now.

Thanks a lot.

nivetha murugan April 29, 2019

Hi Divya,

I too facing the same issue as u got. Can u suggest me what URL u were using to get this work done.

I wanted to trigger bamboo build when the issue transition in JIRA. I have doubt in webhook URL in JIRA. 

Kindly give some idea.

Mahesh Pawar August 24, 2019

In workflow tat transition add a webhook.

In that webhook call your Bamboo job using this URL:

http://yourusername:yourpasswd@bamboo-host:8085/rest/api/latest/queue/PLAN-KEY?os_authType=basic

This will trigger the bamboo the plan once transition is occured.

Suggest an answer

Log in or Sign up to answer