5

您如何配置 CruiseControl 以在构建失败时发送包含错误日志的电子邮件?我已经让它在构建失败时向用户发送电子邮件,但它不包括导致构建失败的实际错误。我知道,如果我仅将其配置为向已进行修改的用户发送电子邮件,则错误日志将包含在这些电子邮件中。这是我所拥有的样本:

<publishers>
    <rss/>
    <xmllogger/>
    <email from="abc@abc.com" mailhost="abc.abc.com" includeDetails="TRUE">
     <users>
         <user name="Joe" group=" devs" address="joe@abc.com"/>
         <user name="Jim" group="devs" address="jim@abc.com"/>
     </users>
     <groups>
         < group name="devs" notification="Failed"/>
     </groups>
     </email>
</publishers>

4

3 回答 3

2

You can check if \cruisecontrol.net\server\xsl\compile.xsl is the same as \cruisecontrol.net\webdashboard\xsl\compile.xsl.

Compile.xsl is the default file used to print the error messages from your error log. The one in \webdashboard\ is used for the web dashboard (as the name implies) and the one under \server\ is used for emails.

You can also check ccnet.exe.config whether or not \cruisecontrol.net\server\xsl\compile.xsl is used for emails.

Mine's for example points to compile.xsl on \server:

<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
<xslFiles>
    <file name="xsl\header.xsl" />
    <file name="xsl\compile.xsl" />
    <file name="xsl\unittests.xsl" />
    <file name="xsl\fit.xsl" />
    <file name="xsl\modifications.xsl" />
    <file name="xsl\fxcop-summary.xsl" />
</xslFiles>
于 2008-10-24T20:48:04.997 回答
1

您的电子邮件发布者将获取 buildlog.xml 并根据您使用的控制台或服务配置中配置的任何 XSL 对其进行转换。无论您将其配置为发送给谁以及何时发送,电子邮件的内容都应该没有区别。只要您在电子邮件发布者和发布者部分中的电子邮件之前进行合并。我看不出有什么不同你确定同样的失败会产生不同的电子邮件吗?我的猜测是你在某个糟糕的地方失败了,并且构建日志不是以一种方式生成的。

于 2008-10-24T20:19:28.907 回答
0

The build log is getting generated. I can see the error. It's just not included in the email.

于 2008-10-24T20:48:47.367 回答