9

We currently having a problem with Teamcity triggering builds with a VCS trigger when there are 0 file changes, our VCS roots are configured with Mercurial

We have a checkout rules setup to only checkout the necessary folder for the solution we want to build and we have a requirement to only build a solution if there are changes in the folder that the solution belongs

The problem we are having is teamcity is triggering a build when there aren't any changes on the folder, this only happends when we merge heads.

The pending changes will show 0 files and if you view the file changes the files shown are from a folder that isn't included in the checkout rules or the VCS trigger.

I can't seem to figure this one out, so any help would be appreciated.

6
  • What's the "Root" path on your Version Control Settings page? Does it include the top level folder or the solution folder only? Commented Dec 18, 2013 at 10:01
  • Its set to the root path of the Repo, which will be the top level folder Commented Dec 20, 2013 at 6:31
  • Try setting it to the solution folder. Commented Dec 20, 2013 at 8:26
  • @Jonathan Did you resolve this? We are having the same issue. Commented Oct 29, 2015 at 22:44
  • @BitMask777 No we never did, gave up in the end :( Commented Nov 23, 2015 at 4:59

2 Answers 2

1
+150

I guess TC9 documentation answers why this is happening. I know that this documentation is for newer version, but it seems to be about exact scenario you have.

Triggering a Build on Branch Merge

The VCS trigger is fully aware of branches and will trigger a build once a check-in is detected in a branch.

When changes are merged / fast-forwarded from one branch to another, strictly speaking there are no actual changes in the code. By default, the VCS trigger behaves in the following way:

  • When merging/fast forwarding of two non-default branches: the changes in a build are calculated with regard to previous builds in the same branch, so if there is a build on same commit in a different branch, the trigger will start a build in another branch pointing to the same commit.
  • If the default branch is one of the branches in the merging/fast-forwarding, the changes are always calculated against the default branch, if there is a build on same revision in the default branch, TeamCity will not run a new build on the same revision.
Sign up to request clarification or add additional context in comments.

2 Comments

This sounds about exactly what was happening but that was a long time ago.
Thanks! It appears that this new behaviour was introduced in TC9. We just need to update :)
0

Have you looked at the trigger rules? You can set a custom trigger rule to only run the build on changes to a specific folder.

http://confluence.jetbrains.com/display/TCD8/Configuring+VCS+Triggers#ConfiguringVCSTriggers-TriggerRulesExample

1 Comment

Thanks that's exactly what we have but only on a merge it will trigger a build when the changes came from another folder. What I might do is add a blanket exclusion and see if that helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.