How do I send an email in CruiseControl.net that contains the svn commit messages and other details?

℡╲_俬逩灬. 提交于 2019-12-11 07:54:09

问题


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:


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="buildmaster@mycompany.com" mailhost="mail.mycompany.com" mailhostPassword="..." mailhostUsername="buildmaster" includeDetails="True">
    <users>
      <user name="Petros Amiridis" address="amiridis@mycompany.com" 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




回答2:


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.



来源:https://stackoverflow.com/questions/1835572/how-do-i-send-an-email-in-cruisecontrol-net-that-contains-the-svn-commit-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!