What is the relation between VCS settings in Trigger section and in Configuration Settings?

Greetings!

My project in TeamCity contains 2 places where I can set branch of VCS to be build.

(a) First one is inside the Edit Configuration Settings -> Version Control Settings menu item.
(b) Second one is inside the Trigger settings.

1. We got 2 places with the same setting. How does it work? May these settings clash with each other, or they expand each other, or they may exclude each other?
2. Which branch is built if I press Run button?

Here is my use-case.

I have a scheduled trigger in my build which tracks several branches described in (a) . I want to add some new branch to my project and if I press Run button - I want that new branch to be build.

3. Where should I add new branch description - to global settings in (a) only? Shoudl I do something else?
4. And if I want this branch to be build on schedule - should I add it to (a) and (b) also?

Thanks for your interest to my topic!

1 comment
Comment actions Permalink

Hi Dmitry,

1. In Version Control Settings branch specification you specify branches that will be monitored. If you attach this VCS to a build configuration, then commits to these branches will be shown as pending in TeamCity UI for this build configuration.
By default, the Schedule watches for builds in the default branch only. If you want to trigger builds on all branches if there are pending changes, you should list these branches on trigger's branch filter.

2. If you press Run button the build start on default branch configured in VCS Settings.

3. You should set this branch as default in the VCS root settings.
4. If you want Scheduled trigger to trigger builds on changes in this branch you should add it to (b) trigger branch filter.

Hope this helped you to understand how it works. If you have further questions, then please don't hesitate to ask!

0

Please sign in to leave a comment.