Checkins to TFVC Team Projects trigger builds in Git Team Project

一个人想着一个人 提交于 2019-12-05 17:45:35

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:

$\GIT_NOTAFOLDER\

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!