views:

92

answers:

1

We are using TFS Build 2010 for Builds. We have two branches of source code (Lets say branchA and branchB).

Now as a part of the build definition we set the projects to build: alt text

Now to employ the same build definition from branchB will mean that I create another build definition file with same content, with only the items to build set to "$/branchB"

Is there anyway to make this configurable, without having to edit the build definition?

Also there are other input variables that we set for the build definition, and the values for these variables are included in the build definition XAML file. So to change the value of a variable will mean that we have to edit the build definition XAML file. This is not desirable.

I would like to be able to set the "Items to Build" and the variables of the build definition without having to modify the build definition XAML file.

Are there any solutions to these problems?

A: 

You can modify the Build Process Template so it only asks you for the Items to Build. The rest of the arguments are prefilled. To get an idea how this works, see http://www.ewaldhofman.nl/?tag=/build+2010+customization

Ewald Hofman
Hi, thanks for the answer I will check it out. Do you have any suggestions about the other part of my question:"there are other input variables that we set for the build definition, and the values for these variables are included in the build definition XAML file. So to change the value of a variable will mean that we have to edit the build definition XAML file. This is not desirable."I would like to be able to set the variables of the build definition without having to modify the build definition XAML file"?
Ngm
I read your posts on the blog, but could not figure out a way to supply the "items to build" parameter. Any clues?
Ngm
The "Items to build" is an internal parameter that you cannot change. So what I did for a customer in the past is removing almost all arguments and moved them to the Variables. Then set the default value to the value of the Variables. When you now use the template, you only have a few options (like items to build), while other options (like run code analysis, run tests, etc.) are not available anymore. Is this what you are after?
Ewald Hofman
Hmm sort of, But looks complicated than i thought earlier. Thanks
Ngm