TeamCity VCS Trigger when multiple VCS Roots attached to Build Configuration
Asked Answered
V

2

6

I have a Build Configuration within TeamCity (TeamCity Professional 8.1.5 (build 30240)) with two VCS Roots attached. The VCS roots point to seperate repositories.

This Build Configuration has a VCS Trigger configured to trigger the project on each check in, with no quiet period specified. The issue is, this trigger does not seem to be working as builds remain in a Pending state.

A trigger rule has been added: "+:root=VCSId_ProjectA:**" so that a change made to "ProjectB" will not invoke the trigger. This trigger has been tested when only one VCS root was attached to the Build Configuration and it works as expected.

The trigger has been tested by polling ProjectA repository and also by a POST hook from ProjectA. Both outcomes are the same. (I have even tried sending multiple POST hooks from ProjectA repository to state that ProjectA and ProjectB had been changed, unsurprisingly, this despair test did not work either).

The checkout rule for one of the VCS roots is: "+:. => .ProjectB". This is to ensure that ProjectB is not in the root directory of ProjectA, but a sub-directory. When manually starting a Pending build, both repositories are fetched from correctly.

Both VCS Roots are configured for feature branches, however, removing the branch specification makes no difference to the outcome either.

Has anyone experienced a similar issue before and able to give some advice?

Vav answered 31/10, 2014 at 13:26 Comment(0)
M
1

It might make a difference or it might not, but the checkout rule should be with slash: "+:.=>./ProjectB" as per example in the TeamCity 8.1 documentation.

Additional note, you will still see pending changes in this build configuration without build being triggered. That will happen when there are changes in ProjectB, but none in ProjectA.

And if above does not answer the question and to get a bit more understanding on this configuration, what's the aim of having extra VCS Root without corresponding trigger rule?

Merry answered 10/11, 2014 at 5:4 Comment(0)
S
1

I have pretty same configuration: 2 VCS roots.
I need to trigger master branch of the first VCS root and run build.
If check in has been detected, it checks out second VCS root and runs build.

Adding this line to VSC root trigger rules helped me: +:root=VCS_root_id:**

It did not work without :**

TeamCity v9.1.3

Sharla answered 28/11, 2015 at 6:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.