Cloning TFS build definition for branches

As part of my effort to allow us to use branches with Octopus deployment, I needed to be able to duplicate our TFS build definitions.
I would then create a branch-specific build definition, called something like MyProject – Branch123

I wanted to set things like a custom drop folder for the branch, and, since we’re using Octopus, set the OctoPackPublishPackageToFileShare folder, specific to this branch.

For example, in our “master” branch, we may have this in the MSBuild Arguments of the build process:

/p:RunOctoPack=true;OctoPackPublishPackageToFileShare=\\myDropFolder\\

However, for this branch specific build definition, I needed it to be

/p:RunOctoPack=true;OctoPackPublishPackageToFileShare=\\myDropFolder\\Branch123

I came across Community TFS Build Manager, which is a handy Visual Studio Extension.
It installs, and then is available in the Tools menu:

communityTFSBuildManager-1

Once open, you can right click on a build definition, and easily Clone:

communityTFSBuildManager-2

Then, select the branch you want to create the build definition clone for.
Nice!

Leave a Reply

Your email address will not be published. Required fields are marked *