TFS Build 2012上的自动电子邮件(Automatic email on TFS Build 2012)

我们正在使用TFS 2012并具有构建服务器设置。 我希望在某个版本完成时发送一封电子邮件。 在这封电子邮件中,我想发送一份关联变更集和相关工作项的列表。 在构建模板中,我调用脚本来部署构建。 那时日志文件不可用。

有没有办法在构建之后运行脚本以便我可以读取日志文件,或者是否有其他方式可以访问电子邮件的关联变更集和关联工作项?

We are using TFS 2012 and have a build server setup. I would like to send out an email when a certain build is complete. In this email I would like to send out a list of the Associated Changesets and Associated Work Items. In the build template I call a script to deploy the build. At that time the log file is not available.

Is there a way I can run a script after the build so that I can read the log file, or is there another way for me to access the Associated Changesets and Associated Work Items for the email?

最满意答案

您可以订阅构建定义的警报,如下面的屏幕截图,当构建完成后,您将收到电子邮件警报。

在此处输入图像描述

如果构建中存在关联的变更集和关联的工作项,您将在电子邮件警报中看到它们:

在此处输入图像描述

有用的链接: https : //msdn.microsoft.com/en-us/library/ms181334(v = vs1010).aspx

You can subscribe an alert for a build definition like following screenshot, when there is a build completed, you'll receive an email alert.

enter image description here

If there are associated Changesets and associated Work Items in the build, you'll see them in the email alert:

enter image description here

Useful link: https://msdn.microsoft.com/en-us/library/ms181334(v=vs.110).aspx

更多推荐