如何获取在构建定义的“过程"部分中刷新的构建过程模板的更新参数? [英] How to get the updated argument(s) of a build process template refreshed in 'Process' section of a build definition?
问题描述
对于构建流程模板
,我们可以添加/删除/编辑它的参数列表,并将其用作构建/工作流程步骤中的变量.我阅读了很好的指南 这里
For a build process template
, we can add/remove/edit the argument list of it and use it as variables within the build/work-flow steps. I reading the nice guide here
我将模板 DefaultTemplate.11.1.xaml 克隆到 sayHello-DefaultTemplate.11.1.xaml
并通过 Visual Studio 2012 对其进行编辑.我首先添加了一个参数,称为 TestMessage
.我将我的变更集签入到源代码管理中.
I'm cloning the template DefaultTemplate.11.1.xaml to sayHello-DefaultTemplate.11.1.xaml
and edit it via Visual Studio 2012. I first added one argument, called TestMessage
. I check in my changeset to the Source Control.
然后我基于这个模板创建一个构建定义sayHelloBuild.当我转到 Process
选项卡时,我可以在 Misc 部分看到 TestMessage
.我保存了构建定义.尝试对其进行排队并成功.
Then I create a build definition sayHelloBuild based on this template. And when I go to the Process
tab, I can see TestMessage
in the Misc section. I save the build definition. Trying to queue it and it gets succeeded.
问题来了.我为名为 ABBCCC
的模板添加了另一个参数并签入源代码.但是,当我编辑构建定义 sayHelloBuild 时,我无法像 MyArugment01
那样在 Process
选项卡中看到 ABBCCC
.
Here comes the issue. I added another argument for the template named ABBCCC
and checkin the source code. But when I edit the build definition sayHelloBuild, I cannot see ABBCCC
in the Process
tab as MyArugment01
does.
如何刷新参数列表?
推荐答案
使用以下脚本删除数据库中注册的构建过程模板:
Use the below script to delete the registed build process template in Database:
使用 Tfs_YourTeamCollectionName;从 tbl_BuildProcessTemplate 中删除,其中 ProcessTemplateID = 'Your ProcessTemplateID';
再次创建新的构建定义.
Create new build definition again.
数据库名称是您的 TFS 团队集合名称,例如TFS 服务器后端 SQL Server 中的 Tfs_YourTeamCollection.我使用的是 TFS 2012.
The database name is your TFS team collection name e.g. Tfs_YourTeamCollection in the backend SQL Server of your TFS server. I'm using TFS 2012.
希望能帮到你!
这篇关于如何获取在构建定义的“过程"部分中刷新的构建过程模板的更新参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!