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.
Asked
Active
Viewed 714 times
3 Answers
1
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:
- CCNetRequestSource = IntervalTrigger for you (this would only email if the interval trigger was the cause of the build)
- 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
- 5,386
- 9
- 38
- 45
-
Latest 1.5 builds can be accessed here: http://ccnetlive.thoughtworks.com/CCNet-builds/1.5.0/ – Lee Aug 17 '09 at 18:21
1
Add the following to your config
<modifierNotificationTypes>
<NotificationType>Change</NotificationType>
</modifierNotificationTypes>

Babak Naffas
- 12,395
- 3
- 34
- 49
0
Now I'm using some kind of workaround:
<triggers>
<parameterTrigger>
<trigger type="scheduleTrigger">
<time>01:00</time>
<buildCondition>ForceBuild</buildCondition>
</trigger>
<parameters>
<namedValue name="SmtpServer" value="smtp.mail.com"/>
</parameters>
</parameterTrigger>
</triggers>
<publishers>
<email mailhost="fake" from="night.builder@mail.com" includeDetails="true" mailhostUsername="night.builder" mailhostPassword="xxx" useSSL="FALSE">
<dynamicValues>
<directValue property="mailhost" parameter="SmtpServer" default="fake" />
</dynamicValues>
</email>
</publishers>
I tried to use No element from Email Publisher, but with no success.
If someone has more proper solution, please share it here.

Eugene
- 3,335
- 3
- 36
- 44