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.

有帮助吗?

解决方案

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.

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top