4

我们正在为我们的一个构建使用升级模板,当它失败时,它会创建一个工作项。请记住,这是升级模板,是否有关闭此功能的方法?我没有像在默认模板中那样看到该选项。

4

2 回答 2

9

这行得通吗?

1-右键单击构建定义

2-编辑构建定义

3- 过程

4-扩展高级

5-创建失败的工作项。将其设置为假

于 2012-09-07T17:42:46.193 回答
3

如果您使用升级模板,则在 TFSbuild.proj 中进行设置(本质上升级模板只运行此文件,因此 Team Build 的行为就像 TFS 2008)。在 proj 文件中,您将看到一个部分

<!-- Additional Properties -->

<!--  WorkItemType
 The type of the work item created on a build failure. 
 -->
<WorkItemType>Bug</WorkItemType>

<!--  WorkItemFieldValues
 Fields and values of the work item created on a build failure.

 Note: Use reference names for fields if you want the build to be resistant to field name 
 changes. Reference names are language independent while friendly names are changed depending 
 on the installed language. For example, "System.Reason" is the reference name for the "Reason" 
 field.
 -->
<WorkItemFieldValues>System.Reason=Build Failure;System.Description=Start the build using Team Build</WorkItemFieldValues>

<!--  WorkItemTitle
 Title of the work item created on build failure.
 -->
<WorkItemTitle>Build failure in build:</WorkItemTitle>

<!--  DescriptionText
 History comment of the work item created on a build failure. 
 -->
<DescriptionText>This work item was created by Team Build on a build failure.</DescriptionText>

<!--  BuildLogText
 Additional comment text for the work item created on a build failure.
 -->
<BuildlogText>The build log file is at:</BuildlogText>

<!--  ErrorWarningLogText
 Additional comment text for the work item created on a build failure. 
 This text will only be added if there were errors or warnings.
 -->
<ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>

<!--  UpdateAssociatedWorkItems
 Set this flag to enable/disable updating associated workitems on a successful build.
 -->
<UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>

您可以注释掉或删除下面的所有内容<!-- WorkItemType.....并添加以下内容

<!-- Additional Properties -->
<SkipWorkItemCreation>true</SkipWorkItemCreation>
于 2012-09-10T10:04:04.187 回答