Checkins to TFVC Team Projects trigger builds in Git Team Project
I have a TFS project set up for continuous integration. My problem is that checkins on other TFS projects are triggering builds of my project even when no change has been made to my project.
It seems to be related to my project being a Team Foundation Git repository, and none of the other projects are.
Where can I look to find out what’s triggering this build?
Edit: To be more clear, what I mean is that I have entirely separate Team Projects. All of them but one use Team Foundation Version Control except one which uses Git. Somehow, checkins on the TFVC Team Projects trigger a build on the Git Team Project
4 Solutions collect form web for “Checkins to TFVC Team Projects trigger builds in Git Team Project”
In our case, this was identified as a bug in TFS by Microsoft.
The ServerItem column in tbl_BuildDefinitionMapping for the appropriate build was set to “$\”.
The fix I got from Microsoft was to change that to something that doesn’t exist like:
This resolved the issue for me.
You need to look up the build definition in tbl_builddefinition. Once you ave found it, remember the DataspaceId.
Then open tbl_builddefinitionmapping and look for the DataspaceId from above. You should see that the ServerItem is $\. Change this to $\GIT_NOTAFOLDER\ and it should resolve the issue.
The build will be triggered any time a file is changed in any mapped folders of that build definitions workspace.
I’m guessing you have the build def’s workspace mapped to broadly. You should only include the folders/files that your build needs (and only changes to those files will trigger your build).
CI builds on Git repository always monitor the whole repository. The only filter you may add is to monitor some branches, but you cannot ‘cloak’ folders or files as you could with classic TFVC.
We fixed this by deleting the workspaces on the TFS build agent using a tool called TFS Sidekick. After recreating the build definitions, builds on other products no longer triggered builds on the product in Git.
I’m still not sure how they were linked.