views:

265

answers:

2

I'd like to email the results of the build along with:

  • svn revision(s) that are in the build
  • commit message(s) for those revisions
  • Other details like the location of where we ftp the resulting executables

Can anyone point me to resources to show how to do this with CC.Net?

I am able to get the standard email that is sent that contains a list of changes, but I see no way to modify the contents of the email. I don't want to send multiple emails.

It looks like I need to set xslFiles, but it is not clear to me how to do that or what they should look like.

+1  A: 

A lot of plain exec's I'm afraid. You would need to create a postbuild section and hook in a custom MSBuild or Nant task that wraps svn log and possibly the svn info command and parses it.

Think of it this way, at least you have full control over what you're doing, but if you're looking for something out-of-the-box for this, I think you're out of luck.

Using the e-mail publisher won't provide you with the commits that happened after the build.

Wim Hollebrandse
Perhaps my question was not clear - I want the commits only for the build they are in. My scenario was probably not worded simply and confused readers.
Tim
Yes, in that case, Petros' example will work nicely.
Wim Hollebrandse
+3  A: 

Each CC.NET project has a "publishers" section. One of the publishers can be "email". Example follows:

<publishers>
  <xmllogger ... />
  <buildpublisher>
    <sourceDir></sourceDir>
    <publishDir></publishDir>
    <useLabelSubDirectory>True</useLabelSubDirectory>
  </buildpublisher>
  <email from="[email protected]" mailhost="mail.mycompany.com" mailhostPassword="..." mailhostUsername="buildmaster" includeDetails="True">
    <users>
      <user name="Petros Amiridis" address="[email protected]" group="buildmaster" />
    </users>
    <groups>
      <group name="developers" notification="Always" />
      <group name="buildmaster" notification="Always" />
      <group name="consultants" notification="Always" />
    </groups>
  </email>
</publishers>

This email contains the build label, the svn changeset and the commit message.

You can learn more about the Email Publisher in the CruiseControl.NET documentation

Petros
That's great - I didn't realize it automatically put that in an email. Thanks - I will try it.
Tim
How do I add content to the email though?
Tim
@frungash The email has a default layout and content. You can customize it though. Check out this article http://tinyurl.com/y9cxf9f
Petros
yep, thanks - fixed it yesterday after more thorough looking thought the docs. Thanks for the help.
Tim