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.
To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.
Builds ScheduleThe Builds Schedule page in the administration area of a specific project displays schedule triggers configured for build configurations belonging to this project. Builds Schedule for the Root Project displays the list of triggers for the entire TeamCity server.
VCS triggers automatically start a new build each time TeamCity detects new changes in the configured VCS roots and displays the change in the pending changes. Multiple VCS triggers can be added to a build configuration.
One or more VCS roots can be attached to a build configuration or a template. You can specify portions of the repository to check out and target paths via VCS checkout rules. To view and manage all VCS roots configured within a project, go to Project Settings | VCS Roots.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With