How to Connect to Bamboo with a Bitbucket Webhook

leegyu86
Contributor
September 25, 2023

I want to trigger Bitbucket's Event Payloads to run my Bamboo Plan.

 

In the Webhook menu of Repository Setting in Bitbucket, what should I enter for the Name, URL, and Secret of Bamboo for Create Webhook?

 

I entered TEST_WEBHOOK as the Name, Bamboo Plan https://bamboo.nsoft.com/build/admin/triggerManualBuild.action?buildKey=ADA-TBT as the URL, and Bamboo's Personal Access Token as Secret.

 

I then pressed the Test connection button and received a 403 response along with the Body message below.

{"status-code":"403","error-code":"XSRF_FAILURE_NO_TOKEN_IN_COOKIE","message":"Unable to access this resource due to a failed XSRF check. Please ensure that a valid XSRF token is provided in the request."}

 

Please help me.

 

1 answer

1 accepted

1 vote
Answer accepted
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
September 25, 2023

Hi Lee,

you can't trigger a build in bamboo via webhook the same way you start a build from the UI (hence the XSRF failure).

Here is a setup guide on how to trigger a post commit build from Bitbucket (Cloud) https://confluence.atlassian.com/bamboo/triggering-a-bamboo-build-from-bitbucket-cloud-using-webhooks-873949130.html

Note that you have to enable and configure webhooks in bamboo first!

I know you have Bitbucket server - but you should be able to use the same approach on the Bitbucket side, entering the Bamboo webhook URL and secret.

Hope that helps, Ulrich

// Izymes - Tools for efficient teams

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events