Re: Conditionally sending emails

Dan Rollo <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Maybe another option is defining two projects, one with the publisher 
for your interval build,
another with the publisher for you non-interval build?


<cruisecontrol>
<project name="intervaleProj">

....
....

<publishers>

<!-- only publishes on failed builds -->

<htmlemail  reportsuccess="never" />

</publishers>

</project>


<project name="Proj">

....
....

<publishers>

<!-- publishes for all scenarios -->

<htmlemail  />
</publishers>

</project>

</cruisecontrol>


From: "Nathan Carbino" <[email protected]>
Subject: Re: [Cruisecontrol-user] Conditionally sending emails
To: <[email protected]>
Message-ID:
	<9A86C00739500244896C8CD661689A1821ECAE@sm-exchange1.pcgt.guardianedge.com>
	
Content-Type: text/plain; charset="us-ascii"

I'm not sure that you can setup builds with conditionals the way you've
indicated. As far as I know multiple project files is the way to
accomplish what you are trying to do.


-Nathan



________________________________

From: Nalin Chandrawansha [mailto:[email protected]]
Sent: Wednesday, June 02, 2010 8:31 PM
To: [email protected]
Subject: Re: [Cruisecontrol-user] Conditionally sending emails


Thanks for quick reply Nathan.

The problem is I have only a single project and, if I set <htmlemail
reportsuccess="always">, then it will send mails for each interval which
I don't want to happen.

Basically what I need is something like following pseudo.

<cruisecontrol>
<project>

....
....

<publishers>

<if interval build>

<!-- only publishes on failed builds -->

<htmlemail  reportsuccess="never" />
</if>
<if nightly build>

<!-- publishes for all scenarios -->

<htmlemail  />
</if>

</publishers>

</project>
</cruisecontrol>



On Wed, Jun 2, 2010 at 10:11 PM, Nathan Carbino
<[email protected]> wrote:


	I believe you would set the 'reportsuccess' property for the
htmlemail publisher for your projects based on your desires. Example,
your interval build would report only on errors and fixes using
something like
	
	<htmlemail  reportsuccess="fixes">
	/htmlemail>
	
	and your nightly builds would always report success, failure,
and fixes (which should be the default I think so might be no need to
change this setting). However, you might explicitly state as such:
	
	
	<htmlemail  reportsuccess="always">
	/htmlemail>
	
	But don't quote me on the syntax, I don't have the reference in
front of me...
	
	-Nathan
	

________________________________

	
	From: Nalin Chandrawansha [mailto:[email protected]]
	
	Sent: Wednesday, June 02, 2010 3:32 AM

	To: [email protected]
	Subject: [Cruisecontrol-user] Conditionally sending emails
	

	Hi,
	
	In my project, I use both nightly builds (say at 11 p.m) and
interval builds (say once every 3 hours).
	
	I need to use htmlemail publisher
	
	1. If an interval build is failed
	
	AND
	
	2. To always publish the nightly build status (let it be failed
or not)
	
	
	Is there a way that I can accomplish above task?
	


	Thanks,
	
	Nalin
	

	
-----------------------------------------------------

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.