Trigger teamcity build on pull request


I want to trigger builds on teamcity when there are commits added to branches, is there a way to do this?



1 answer

1 accepted

0 votes
Eric Henry Atlassian Team Jul 11, 2017

It depends on your TeamCity setup. Do you have it installed behind a firewall (can it be accessed publicly)?

The short answer is to set up webhooks. If your install is not publicly accessible, then you'll have to jump through some more hoops. Let me know and I can help either way.

It's publically accesible, but I can't figure out how to setup web hooks that work with teamcity.

Do you know of an tutorial on this?

It looks like I was slightly wrong. You'll need to set up polling to make this work (please make sure to set the poll interval to no less than 5 minutes).

These should get you going:

If you'd rather have builds triggered, you'll need something in between Bitbucket and TeamCity to receive the webhook and make the appropriate TeamCity API request (this could be done with an AWS Lambda).

Here's the info for that direction:

Lastly, you can jump in to this HipChat room if you want some more "real-time support":

@Eric Henry Now the Bitbucket has its own Webhooks since 5.4 release. But they looks like I can't use them. There is no authorization, I can't select POST request. Am I wrong? 

Polling is not an option - too many repositories

Eric Henry Atlassian Team Nov 03, 2017

Hello @Max Gorovenko - it sounds like you're using Bitbucket server. You'll want to check in that section, as Bitbucket cloud acts differently for webhooks.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

681 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot