Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA -> Bamboo Webhook returns 400 client error

Hello,

 

I am trying to find a way to use JIRA Webhooks to kick off a Bamboo plan on specific Transitions. We have successfully been able to CURL the REST call using the following:

curl -X POST -i "http://BAMBOOHOST:8085/rest/api/latest/queue/PROJECTKEY-PLANKEY?os_authType=basic&os_username=user&os_password=password&executeAllStages=true"

However, when we make a Webhook in Jira to go to

http://BAMBOOHOST:8085/rest/api/latest/queue/PROJECTKEY-PLANKEY?os_authType=basic&os_username=user&os_password=password&executeAllStages=true

we can see in the jira-log that we get the following error:

2018-03-09 11:04:40,596 httpclient-callbacks:thread-12 WARN anonymous     [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Client error - 400 when posting to webhook at 'http://BAMBOOHOST:8085/rest/api/latest/queue/PROJECTKEY-PLANKEY?os_authType=basic&os_username=user&os_password=password&executeAllStages=true'

My best guess is that it was to do with the fact it thinks the call was anonymous. I am having similar issues to the question found at JIRA-webhook-trigger-Bamboo-build, but the question was only answered by using a plugin which is difficult for us to do based on our environment.

 

We were able to make a JIRA webhook contact Bamboo using the server/pause and server/resume REST calls, but not 'queue'

 

Best Regards,

Kyle

1 answer

0 votes
Jeyanthan I Atlassian Team Apr 07, 2018

Hi Kyle,

If your intention is to trigger a build upon a JIRA transition, the action call (/api/rest/updateAndBuild.action?buildKey=) using the endpoint updateAndBuild.action can be used to trigger a build. This checks whether there are changes in the repository associated with the planKey provided as parameter. Upon doing, Bamboo will:

  • trigger a build against the buildKey provided
  • will check if there are any other changes in the repository, including branches. If so, will trigger a build against branches as well.

This article hints you with an example on how to trigger a build by adding this endpoint in a 'postCommitBuildTrigger.py'to work with Subversion.

Let us know if that helped you.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

179 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you