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

StackOverflow https://stackoverflow.com/questions/22111728

Question

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.

Était-ce utile?

La solution

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).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top