Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Team City to only trigger a build on a Github pull request if it contains changes in a specific folder

I have a TeamCity configuration to monitor Github pull requests, such that it will pick up any pull requests from Github and then triggers a build.

Now, I only want it to trigger a bulid for the pull requests that contains changes in a specific folder.

Let's say my repo root folder is c:\myProject, the specific folder is c:\myProject\HelloWorld. My aim is to get TeamCity to only trigger a build if the pull request contains changes to the files in HelloWorld folder.

Any thoughts on how to configure it? Many thanks.

like image 489
delpielo Avatar asked Mar 01 '14 07:03

delpielo


People also ask

How do I change pull request settings in GitHub?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Pull Requests", select or unselect Always suggest updating pull request branches.

How do I create a specific branch in TeamCity?

To run builds from a specific branch or set of branches automatically, configure build triggers. You can also filter history by a branch name if you're interested in a particular branch. TeamCity assigns a branch label to the builds from the default branch too.


1 Answers

In your VCS Trigger, you can define a trigger rule with an Ant-like wildcard, in this case +:HelloWorld/** (the exact file path syntax may be incorrect in this example).

like image 103
Pedro Pombeiro Avatar answered Sep 30 '22 18:09

Pedro Pombeiro