4

I want to integrate the execution of a custom tool to our build (say CLOC, to gather LOCs by language) in TFS 2010. I know I can do that by creating a custom activity that I can then integrate into a custom template (or simply use the InvokeProcess activity).

The real question is that I want to associate the results of this tool (LOCs by language) to every build, so that custom reports can be created to see the evolution of these values (e.g. the evolution of total LOCs over time/builds).

I have seen a sample of a custom datawarehouse adapter: is that the way to go? Do I store my custom values in the IBuildDetail? How?

Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
Mac
  • 8,191
  • 4
  • 40
  • 51

3 Answers3

3

Absolutely, going down the road of using a custom data warehouse adapter is absolutely the method I would choose. If you want to find a TFS 2010-specific sample for a custom warehouse adapter, you can find it at the TFS SDK site.

The Visual Studio Code Metrics Power Tool that became available is one way that you can get some good information during the build process. Jakob Ehn did some work to show how to integrate the tool into a TFS 2010 build process template.The key would be how to store that particular date in a meaningful way where the data won't likely get removed (so that you can rebuild the warehouse at any time) and is portable in case the Team Project Collection database is moved to another server instance.

Ideally, what I would do is during the build process, add a build information node to the IBuildDetail object's Information collection before the build has completed with your special information. There are a lot of different standard types of build information nodes that you can use (IBuildInformation - see the extension methods for some ideas) but you can create your own custom type.

Whenever the data warehouse adapter runs later, it can search through the build information nodes for the IBuildDetail (IBuildDetail.Information)to find your special data and pump it into the custom measure that you create for the build dimension.

Let me know if you have any other questions!

Ed Blankenship
  • 5,235
  • 1
  • 31
  • 31
  • Thanks for the heads up! But I started delving into the custom warehouse adapter. Down to the sql level, really?... – Mac Sep 27 '11 at 09:51
  • Yes- I know! You'll definitely have to get down into the SQL layer and then possibly understanding how to create dimensions, measures, etc. in the SQL Analysis Services cube. – Ed Blankenship Sep 28 '11 at 00:22
0

The Microsoft Visual Studio ALM Rangers are considering to pick this up as a guidance project. If you find this an important item for more guidance, then please add your vote here.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
0

I came up with the idea to store the data in TFS by creating a custom work item type holding the values in an reportable dimension. When it works you'll get a lot for free. Haven't tried it out yet though.

riezebosch
  • 1,950
  • 16
  • 29