views:

983

answers:

4

How do you configure cruiseControl to send out emails that contains the error log whenever a build fails? I've gotten it to send out emails to users when the build fails, but it does not include the actual error that caused the build to fail. I know that if I only configure it to send out emails to the users that have made modifications, the error log is included in those emails. This is a sample of what I have:

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

A: 

Your email publisher will take the buildlog.xml and transorm it against whatever XSL's are configured either in your console or service config depending on which you use. There should be no difference in the content of the email though no matter on who you have it configured to be sent to and when. As long as you have the merge before the email publiseher and the email in the publishers section. I don't see how it could be different Are you sure the same failure produces different emails? My guess would be you are failing somewhere bad and the build log is not being genereted one way.

Alex
+2  A: 

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>
stung
A: 

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

Technically the errors shown on the email should be the same as the ones shown on the webdashboard is the two compile.xsl that I mentioned in my answer is the same. Have you compared the two xsl files?
stung
A: 

Thanks! I was missing compile-MsBuild.xsl

Hope that helped .. please mark answers as answered where you find fit.
stung