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)?
TeamCity triggers too many builds for a new branch
Asked Answered
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. –
Rivalee
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? –
Castorena
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.
Thanks, that seems to do the job, although it still triggers a build when a new branch without changes is created. But I guess one build won't hurt. –
Castorena
Where to set this? Exactly? Why can't there be some kind of interface with checkboxes for those boolean values. –
Shivery
You can set it either as a parameter in build configuration - to affect a particular build configuration, or in internal.properties to affect all build configurations. –
Mortenson
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
Thanks. Although I want it to trigger on each check-in. But imagine I work on a feature branch which gets continuously built by TeamCity. When I then merge it back to the main branch I don't want a build triggered for each commit as they already have been triggered on the other branch. –
Castorena
So
runBuildOnSameRevisionInEveryBranch
seems exactly what i wanted. –
Castorena © 2022 - 2024 — McMap. All rights reserved.