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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,284
Community Members
 
Community Events
184
Community Groups

Is there a way to pass jira IDs to bamboo build api

Hi,

We are using Bamboo REST API to run the builds automatically. And we want to pass the jira's associate with the build too. Is there any way we can do that.

 

We are using below method to run the build

curl -k --user user:password -X POST -d "stage&executeAllStages" http://bamboo:8085/rest/api/latest/queue/proj_Name-plan_Name

 

If I have Jira number ji-23,ji-24,ji-25 & ji-26 I want to pass this jiras and want to see in the build in commit section.

 

Thanks,
Chethan

 

 

1 answer

0 votes
Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Aug 06, 2020

Hi Chethan,

As far as I know there is no direct way through the rest api.

I do know of a workaround though. Adding a comment with the issue key, links it correctly to the jira issue.

The first request to start the  plan returns xml including the build key and number.

If you parse that build number and then make a comment for each jira issue that you have e.g:

curl -k --user user:password -X POST -d "{\"content\":\"ji-23\"}" http://bamboo:8085rest/api/latest/result/projectkey-plankey-buildnumber/comment -H "Content-Type: application/json"

Then a comment will appear on the build, correctly linking it to each of the issuekeys and adding it to the "issues" section of the build.

Hope that helps!

Richard

Thanks for quick response,

Once I run this curl  command as provided I get a  > prompt in linux box so i feel still expecting some other data.

Can you Please help me on this.

Regards,

Chethan

Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Aug 08, 2020 • edited

That can happen if you haven't matched all of your quotes:

e.g you have a starting " but not an ending one.

 

There is also slightly typo in my comment, url should be http://bamboo:8085/rest..., not http://bamboo:8085rest.

 

If it's still not clear after a close look at your command, maybe paste it here (minus the username and password)

Hi Richard,

Thanks a lot. I am able to post the comment thanks for all the help

Regards,

Chethan

Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Aug 09, 2020

Glad I could help.

If it solved the underlying problem, feel free to mark the answer as solution, it helps other people having the same issue find the answer.

Cheers,

Richard

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events