开发者

How do i automate the branch/new team build process in TFS

开发者 https://www.devze.com 2022-12-09 23:48 出处:网络
We make a release branch from trunk at the end of each sprint. This is a manual job; we branch the src and manually edit the build config.

We make a release branch from trunk at the end of each sprint.

This is a manual job; we branch the src and manually edit the build config.

This has proved to be an error prone process. I开发者_如何学Pythons it possible to automate it in TFS?


Yes, you can automate in TFS using the .NET API. This give you access to the VersionControlServer object for branching along with the IBuildServer object for modifying your build definitions.

The following question might be useful when it comes to performing the branch in code.

How to create a new source code branch using TFS API?


You can use the branch command of the tf command-line utility:

http://msdn.microsoft.com/en-us/library/d73s8b27.aspx

I don't have any advice on editing the build config, though.


Good question (the issue will hit me soon ;) ).

Several ideas (how I'll start):

  • use a parameter as part of the path to solution/s, so you'll need to change just in 1 place instead of several

  • branch build definition

  • workspace should be reconstructed manually (at least from what I know now - we are using 2-3 TFS Projects in a workspace)

  • override BuildNumber using BuildNumberOverrideTarget

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号