views:

250

answers:

2

We have CruiseControl doing nightly builds for us. If the nightly build fails it sends out an email. The programmer will fix the problem check in his/her changes then do a force build. If the build fails then an email is sent again. Is there a way to not send email when a force build is pressed.

+1  A: 

I don't think it is possible in 1.4. But, it should be possible in 1.5 with the new tag "dynamicvalues" for the Email publisher.

This tag should have two variables you may be able to check. Since it hasn't been fully released, I can only speculate what might work for your specific needs.

Possible Tags:

  1. CCNetRequestSource = IntervalTrigger for you (this would only email if the interval trigger was the cause of the build)
  2. CCNetBuildCondion = IfModificationExists (this might ignore forced builds)

Example:

Your config will eventually have something similar to this in the email publisher:

<email>
...
<dynamicValues>
  <directValue>
    <property>buildArgs</property>
    <parameter>BuildArgs</parameter>
    <default>-t:$[$CCNetRequestSource|IntervalTrigger]</default>
  </directValue>
</dynamicValues>
...
</email>

CruiseControl.NET version 1.5 is already CTP. So, it will be soon.

Link Heaven:

Jeremiah
Latest 1.5 builds can be accessed here:http://ccnetlive.thoughtworks.com/CCNet-builds/1.5.0/
Lee
+1  A: 

Add the following to your config

<modifierNotificationTypes>
 <NotificationType>Change</NotificationType>
</modifierNotificationTypes>
Babak Naffas