Ndesai
Ndesai

Reputation: 43

In CruiseControl.net, How do I incorporate build error message in email?

When build fails I want to grab error message from log file and send that as part of email body. How can I do this? I am using msbuild. I can attach xml file from buildlogs folder but I would rather send plain text.

Upvotes: 4

Views: 904

Answers (1)

Benjamin Baumann
Benjamin Baumann

Reputation: 4065

It's pretty easy. Assuming you are correctly logging msbuild task (with the thoughtworks logger for example), you need to :

  • Edit the ccservice.exe.config file (on your build server, path $CCNET\server): add the xsl files you need in the xslFiles section (that's for the email content)
  • Do the same with the dashboard.config file (on your build server, path $CCNET\dashboard), that's for the dashboard content.

I think you need to add the xsl\compile-msbuild.xsl file. For example my section looks like this :

<xslFiles>
    <file name="xsl\header.xsl"/>
    <file name="xsl\compile.xsl"/>
    <file name="xsl\compile-msbuild.xsl"/>
    <file name="xsl\unittests.xsl"/>
    <file name="xsl\fit.xsl"/>
    <file name="xsl\modifications.xsl"/>
</xslFiles>

Upvotes: 2

Related Questions