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

Trigger teamcity build on pull request

Alexandru Calinoiu June 23, 2017

Hi,

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

Regards,

 

3 answers

1 accepted

2 votes
Answer accepted
Eric Henry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 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.

Alexandru Calinoiu July 12, 2017

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?

Eric Henry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2017

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:

https://confluence.jetbrains.com/display/TCD10/Configuring+VCS+Post-Commit+Hooks+for+TeamCity

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

https://www.hipchat.com/g0Y9ANOvI

Max Gorovenko October 18, 2017

@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
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 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.

Abhisek Tripathy September 18, 2018

Hi  @Eric Henry . Can you please help on a issue.

Requirement : we want to build a job on Jenkins , On Pull request raised for a Multibranch Pipeline .

If there is a DSL code is there that will be better or plugin also helpful.

What are the requirements and how to configure please guide me . 

Eric Henry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2018

@Abhisek Tripathy - I would ask this as its own question so you can get some help from the community. Unfortunately I'm not at all familiar with what you're trying to do on Jenkins.

Abhisek Tripathy September 18, 2018

Thanks for your reply

Jan Wilson August 25, 2019

I'd like also to trigger TC builds from a pull request issued in BitBucket Cloud.  The build that needs to run is a post merge.

I think that the answer doesn't lie with with BB WebHooks as our TC server is private. Possibly, it's some configuration of a VCS Trigger in TC - but I'm stumped in how to do this.

Any links or advice please?

Jan Wilson August 25, 2019

Just found this link which I'm going to investigate since we already are using BB pipelines:

https://community.atlassian.com/t5/Bitbucket-questions/Referencing-Pull-requests-for-CI-server-builds-TeamCity/qaq-p/1109278

Josh Gust June 30, 2020

@Eric Henry  Is there any way you can point the population using server to actual questions or articles relating the the original question? The link you provided is just a pile of all questions and articles with the tag bitbucket-server.

2 votes
Leslie Hernández G September 26, 2019

i want to trigger builds when a issue status change in Jira , this is possible ? 

I have been checking webhooks but i need send a POST request to teamcity.

 

Anyone knows how can i do that ?

0 votes
Thomas Lunsford February 7, 2024

I just went through a related need:

https://stackoverflow.com/a/77957491/284598

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events