How can I tell why TFS ran a build?

Viewed 68

I have a xaml build definition that has its trigger set to run nightly and the "Build if nothing changes" is unchecked. If I run a build during the day and then no-one checks in for the remainder of the day, for some reason, TFS is building the same changeset at the trigger's time. This seems to be happening with several different build definitions for different branches. Is there a way to tell why it is building? I updated the TFS Server to the current version (Tfs2017.Update3) several months ago, to be honest, I did not check or notice if this has been happening since I've updated to TFS 2017 sometime last year. Are there any TFS database tables to check to see what triggers a build?

Here's my current setup: enter image description here

1 Answers

Make sure the workspace section for any other build definition that would be CI (build on check-in) is set to the specific folder where that build should get files from. The default was $/projectname which is start that build anytime ANY files change anywhere in that project. You need to make you workspace section very specific when using CI or you will have unintended consequences like you are seeing. Source settings for xaml builds

Related