Sending Email to user when Build fails

Added by Sunil Singh over 5 years ago

Hi,
i am using source control as VSTS with TFS 2008 and VS 2010. i have installed CCnet and its working fine with compiling and building on Build Server. I need to send email to Team Lead and Developer who broke the build. I am not sure if reg expression will help here . If some developer checkin some code and CCNET runs integration on Build machine, it should get the userid from Source control whose checkin Failed the build . Is it possible?

Here is the email part that iam using. i am not even getting email if it succeeds.

<email mailport="25" includeDetails="TRUE" useSSL="FALSE">
<from>one@com</from>
<mailhost>net</mailhost>
<users>
<user name="xyz" group="buildmaster" address="gsdgg.com" />
<user name="xyz" group="developers" address="gggg.com" />
</users>
<groups>
<group name="developers">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Success</notificationType>
</notifications>
</group>
</groups>
<converters>
<regexConverter find="$" replace="@asdgsg.com" />
</converters>

&lt;modifierNotificationTypes&gt;
&lt;NotificationType&gt;Failed&lt;/NotificationType&gt;
&lt;NotificationType&gt;Fixed&lt;/NotificationType&gt;
&lt;NotificationType&gt;Success&lt;/NotificationType&gt;
&lt;/modifierNotificationTypes&gt;
&lt;subjectSettings&gt;
&lt;subject buildResult="StillBroken" value="Build is still broken for {CCNetProject}" /&gt;
&lt;/subjectSettings&gt;
&lt;xslFiles&gt;
&lt;file&gt;xsl\header.xsl&lt;/file&gt;
&lt;file&gt;xsl\compile.xsl&lt;/file&gt;
&lt;file&gt;xsl\unittests.xsl&lt;/file&gt;
&lt;file&gt;xsl\modifications.xsl&lt;/file&gt;
&lt;/xslFiles&gt;
&lt;/email&gt;

Replies (2)

RE: Sending Email to user when Build fails - Added by Ruben Willems over 5 years ago

Hi

String array The following values are valid:

  • Always
  • Change
  • Failed
  • Success
  • Fixed
  • Exception

they are case sensitive :-)

you entered
notification="change"
it should be
notification="Change"

RE: Sending Email to user when Build fails - Added by Sunil Singh over 5 years ago

Thanks Ruben. I was able to send email now. But i have some questions related to CC and BCC options? I already vreated one question.

(1-2/2)