在“ AssociateChanges”步骤中的TFS Build XAML模板获取所有工作项,因为乞求创建了源代码分支 [英] TFS Build XAML Template at “AssociateChanges” step get all the Work Items since begging of the source code branch created

查看:48
本文介绍了在“ AssociateChanges”步骤中的TFS Build XAML模板获取所有工作项,因为乞求创建了源代码分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问了类似的问题

TFS构建配置:获取特定构建的所有工作项详细信息

根据上述问题的答案,我得到了以下查询。我决定开始一个新线程以解决新问题,而不是使同一线程中的人们感到困惑。

And based on the answer of above question I have the below query. I decided to start a new thread for new question rather than confusing people in same thread.

我正在为TFS构建配置的工作流使用默认的XAML模板。 现在我的要求是,无论何时上次成功构建,无论何时触发任何构建定义的构建事件,我都需要自开始以来的所有工作项。

I am using a default XAML template for workflow of TFS build configuration. Now my requirement is that I need all the Work Items since beginning whenever I trigger a build event for any build definition regardless of last successful build.

让我们先触发TFS构建,然后成功,然后触发第二构建,也成功。

Let say I have triggered first TFS build and it is succeeded then I triggered 2nd build and that is also succeeded.

然后,我打开了第二次成功构建的日志文件并转到上一版本的诊断标签。在诊断标签内,有一个部分为关联自上次良好构建以来发生的变更集。

Then I have opened the log file of 2nd successful build and goes to Diagnostics Tab of last build. Inside Diagnostics tab there is a section as "Associate the changesets that occurred since the last good build"

在此操作中,它将显示类似消息

Inside this it will display a message like


没有提交任何变更集来构建'ABC .....'

"No change sets are submitted to build 'ABC…..'"

鉴于此,我需要自开始以来的所有工作项列表。
请建议我在XAML模板中需要进行的更改,以便我可以获取自源代码开始以来的所有工作项。

推荐答案

我们知道,关联变更集和工作项仅在上一次良好构建之后发生。

As we know, associate the changesets and work items only occurs since the last good build.

有一个简单的解决方法为了实现所需的功能,您可以指定一个先前的变更集以对构建进行排队,然后再次构建最新的变更集,然后再次获得关联的变更集和工作项。请参阅此博客: http:// chamindac .blogspot.sg / 2013/09 / tfs-2012-get-release-build-with.html

There is a simple workaround to achieve what you want, you can specify a previous changeset to queue a build, then build the latest changeset again, then you'll get the associated changesets and work items again. Refer to this blog: http://chamindac.blogspot.sg/2013/09/tfs-2012-get-release-build-with.html

否则,您需要创建一个 MSBuild自定义任务,该任务将调用TFS对于项目。检查以下链接:

Otherwise, you need to create a MSBuild custom task that makes a call to TFS for the items. Check the links below:

  • https://volatilecoding.com/2013/06/11/tfs-build-how-to-customize-work-item-association/ (this solution is for TFS2010/TF2012 build process template, you'll need to work on TFS 2013 build process template).
  • http://devgorilla.net/?p=104

这篇关于在“ AssociateChanges”步骤中的TFS Build XAML模板获取所有工作项,因为乞求创建了源代码分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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