如何在TFS Build 2010中配置可定义的输入变量值和“要构建的项目”? [英] How to make build definition in TFS Build 2010 configurable w.r.t input variable values and "items to build"

查看:77
本文介绍了如何在TFS Build 2010中配置可定义的输入变量值和“要构建的项目”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将TFS Build 2010用于构建。我们有两个源代码分支(假设为branchA和branchB)。

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

现在,作为构建定义的一部分,我们将要构建的项目设置为:
< img src = https://i.stack.imgur.com/W6dLb.jpg alt = alt文字>

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

现在要使用与branchB表示我将创建另一个具有相同内容的构建定义文件,仅将要构建的项目设置为 $ / branchB。

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?

我们还为构建定义设置了其他输入变量,这些变量的值包含在构建定义XAML文件中。因此,要更改变量的值将意味着我们必须编辑构建定义XAML文件。这是不可取的。

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.

我希望能够设置要构建的项目和构建定义的变量,而不必修改构建定义XAML文件。

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?

推荐答案

您可以修改构建过程模板,因此它仅询问您要构建的项目。其余参数已预先填写。要了解其工作原理,请参见 http://www.ewaldhofman.nl /?tag = / build + 2010 + customization

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

这篇关于如何在TFS Build 2010中配置可定义的输入变量值和“要构建的项目”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆