简体   繁体   English

在“ AssociateChanges”步骤的TFS Build XAML模板获取所有工作项,因为乞求创建了源代码分支

[英]TFS Build XAML Template at “AssociateChanges” step get all the Work Items since begging of the source code branch created

I have asked a similar question 我问过类似的问题

TFS Build Configuration: get all the Work Items Details for a particular build 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. 我决定开始针对新问题的新话题,而不是使同一话题中的人们感到困惑。

I am using a default XAML template for workflow of TFS build configuration. 我正在为TFS构建配置的工作流使用默认的XAML模板。 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. 现在,我的要求是,无论何时最后一次成功构建,无论何时触发任何构建定义的构建事件,都需要自开始以来的所有工作项。

Let say I have triggered first TFS build and it is succeeded then I triggered 2nd build and that is also succeeded. 假设我已经触发了第一个TFS构建并且已经成功,然后我触发了第二个构建并且也成功了。

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 在其中,它将显示一条消息,例如

"No change sets are submitted to build 'ABC…..'" “没有提交任何变更集来构建'ABC .....'”

Whereas I require list of all the work items since beginning. 鉴于我需要自开始以来的所有工作项目清单。 Please suggest me the changes which need to be done in XAML template so that I can get all the work items since the beginning of source code. 请向我建议需要在XAML模板中进行的更改,以便我可以获取自源代码开始以来的所有工作项。

As we know, associate the changesets and work items only occurs since the last good build. 众所周知,将变更集和工作项相关联仅发生在上一次良好构建之后。

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 请参阅此博客: http : //chamindac.blogspot.sg/2013/09/tfs-2012-get-release-build-with.html

Otherwise, you need to create a MSBuild custom task that makes a call to TFS for the items. 否则,您需要创建一个MSBuild自定义任务 ,该任务将对该项目调用TFS。 Check the links below: 检查以下链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM