9
votes

When I create a new branch B from branch A and do a single commit, TeamCity triggers multiple builds on B, although I would expect just a single build.
I set "Trigger a build on each check-in" to true, but nevertheless there should only be a single build because there is only one new commit. It seems that TeamCity triggers a build for each commit within the current month. All builds of branch A finished and the same build configuration is used to build branch A and B. Can I configure TeamCity to create builds just for the commits that haven't been built (no matter on which branch)?

2
I've had this happen before, but I'm not sure what the reason was. In this case I cancel all the outstanding builds and then rerun the build, which always seems to batch the changes altogether in one build.Castrohenge
Of course this would work, but it's obviously not a sustainable solution. Can you remember if you changed anything or did it just disappear or did you reinstall the whole system?Johannes Egger

2 Answers

16
votes

It looks like you faced with this issue. As current workaround please try to set

teamcity.vcsTrigger.runBuildOnSameRevisionInEveryBranch=false

You can set it either as a parameter in build configuration - to affect a particular build configuration, or in internal.properties file to affect all build configurations.

0
votes

I suppose you have activated the VCS build trigger for that Build Configuration. So, go to that Build Configuration settings page > Triggers > and look for the VCS trigger. Click the edit link and a modal will appear, there will be the option you are looking for: "Trigger a build on each check in": https://confluence.jetbrains.com/display/TCD8/Configuring+VCS+Triggers#ConfiguringVCSTriggers-PercheckinTriggering