Checkins to TFVC Team Projects trigger builds in G

2019-05-08 21:59发布

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条回答
地球回转人心会变
2楼-- · 2019-05-08 22:27

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.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-05-08 22:28

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.

查看更多
forever°为你锁心
4楼-- · 2019-05-08 22:29

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).

enter image description here

查看更多
Rolldiameter
5楼-- · 2019-05-08 22:32

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.

查看更多
登录 后发表回答