我想将自定义工具的执行集成到我们的构建中(例如 CLOC,按语言收集 LOC) TFS 2010。我知道我可以通过创建自定义活动来做到这一点,然后将其集成到自定义模板中(或者简单地使用 InvokeProcess 活动)。
真正的问题是,我想将该工具的结果(按语言的 LOC)与每个构建相关联,以便可以创建自定义报告来查看这些值的演变(例如,总 LOC 随着时间/构建的演变)。
我看过 自定义数据仓库适配器:这是要走的路吗?我是否将自定义值存储在 中IBuildDetail
?如何?
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?
发布评论
评论(3)
当然,使用自定义数据仓库适配器绝对是我会选择的方法。如果您想要查找自定义仓库适配器的 TFS 2010 特定示例,可以在 TFS SDK 站点。
可用的 Visual Studio Code Metrics Power Tool 是一种方法您可以在构建过程中获得一些有用的信息。 Jakob Ehn 做了一些工作来展示如何将该工具集成到 TFS 中2010 构建流程模板。关键是如何以有意义的方式存储该特定日期,其中数据不太可能被删除(以便您可以随时重建仓库)并且可以移植,以防万一团队项目集合数据库已移动到另一个服务器实例。
理想情况下,我要做的是在构建过程中,将构建信息节点添加到
IBuildDetail
构建完成之前对象的信息集合以及您的特殊信息。您可以使用许多不同标准类型的构建信息节点(IBuildInformation
- 请参阅扩展方法以了解一些想法),但您可以创建自己的自定义类型。每当数据仓库适配器稍后运行时,它都可以在构建信息节点中搜索
IBuildDetail
(IBuildDetail.Information
< /a>) 查找您的特殊数据并将其注入您为构建维度创建的自定义度量中。如果您还有其他问题,请告诉我!
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!
Microsoft Visual Studio ALM Rangers 正在考虑将此作为指导项目。如果您发现这是获取更多指导的重要项目,那么 请在此处添加您的投票。
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.
我提出了通过创建自定义工作项类型将数据存储在 TFS 中的想法,该类型将值保存在可报告维度中。当它起作用时,你将免费获得很多东西。不过还没有尝试过。
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.