Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Bitbucket POST webhook to TeamCity

Edited

Good morning to everyone!

 

Already readed:

- Bitbucket-questions/Trigger-teamcity-build-on-pull-request
- confluence.jetbrains.com/REST+API
- confluence.jetbrains.com/Accessing+Server+by+HTTP

 

We have:

- Bitbucket Cloud
- Local TeamCity server and agents

The problem is the following: run build with webhooks and not with polling.

TeamCity side, for trig a build there are only two POST URL:

- a deprecated one with parameters in the query string (note: docs says "HTTP GET" but "405 Only POST method is allowed for this request")
- the "new" one with parameters in the request body

Bitbucket side:

- webhook are only in GET (we need to make a POST)
- i can't find how to specify wildcard/placeholder for URL/Body parameters as "actual branch" 
- there are little few plugins that can help, but they aren't available for cloud

 

Nice plugin: http-request-hook-for-bitbucket-server - it will solve our problem, performing a request with a wildcard to the deprecated Teamcity url... but isn't available for Bitbucket Cloud.

 

Any suggestions on how to make this works?
Thanks in advance.

3 answers

Hi. I have the same problem. Have you solved it?

do you resolved the problem ? I have the same problem, I want to do a POST to run a specific build configuration when a story change of the status. 

Like Leslie Hernández G likes this

Thank you for answer.

Then I need to create a POST request that contains information when a JIRA status changes from In Progress to Done, and then receive it.

But i dont understand where I call the Teamcity API, because already have the curl request to run a build.

 

curl -v -u user:pass https://...app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary @Build.xml

webhookexample.png

0 votes
Net Wolf I'm New Here Oct 11, 2021

I created a TeamCity plugin to solve this exact problem.

It listens for webhooks and then allows you to extract variables from a webhook payload using JSONPath, and assign them to build parameters for TeamCity. Then it triggers the build.

See more here: https://github.com/tcplugins/tcWebHookTrigger

do you resolved the problem ? I have the same problem, I want to do a POST to run a specific build configuration when a story change of the status. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Partner Webinar Opportunities: January 2022

Hi everyone 👋, I really like the format of the webinar opportunities summary that @Jimmy Seddon posts monthly on the Welcome Centre group. It's a great place to go to check that you didn...

39 views 0 4
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