From: Chris F. <Chr...@ca...> - 2012-03-19 21:49:49
|
I thought I had this figured out. I see that I'm calling my <fail> task in my Nant script. I see it in my ccnet console fail: [echo] ******** BUILD FAILED! ****** BUILD SUCCEEDED - 1 non-fatal error(s), 2 warning(s) Total time: 25.8 seconds. But how come ccnet still says "BUILD SUCCEEDED"? -chris From: Chris Fouts [mailto:Chr...@ca...] Sent: Wednesday, February 29, 2012 3:15 PM To: nan...@li... Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail condition? Thanks Adam and Bob. From: Adam Bruss [mailto:ab...@aw...] Sent: Wednesday, February 29, 2012 1:45 PM To: nan...@li... Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail condition? Nant has an if task that can check the values of properties. Then you can use the <fail> task to fail the build if a property matches some value. Use resultproperty of the exec task to get the return value of your build. if: http://nant.sourceforge.net/release/0.85/help/tasks/if.html fail: http://nant.sourceforge.net/release/0.85/help/tasks/fail.html Adam Bruss Senior Development Engineer AWR Corporation 11520 N. Port Washington Rd., Suite 201 Mequon, WI 53092 USA P: 1.262.240.0291 x104 F: 1.262.240.0294 E: ab...@aw... W: http://www.awrcorp.com<http://www.awrcorp.com/> From: Chris Fouts [mailto:Chr...@ca...] Sent: Wednesday, February 29, 2012 11:05 AM To: nan...@li... Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail condition? I build TWO projects in one nant.build project file, say project1 and project2, that share a LOT of common files; hence, for NOW, I want to keep it this way. I do this Set properties project1_ok=false and project2_ok=false Build project1 and project2 shared files If project1 and project2 shared files fail Stop the build and report failure Continue building project1-specific files If project1-specific files build project1_ok=true Continue building project2-specific files If project2-specific files build Project2_ok=true nant_pass_fail_property = project1_ok AND project2_ok So if either project1_ok or project2_ok is false, I want ccnet to report a failure. Make sense? -chris From: Bob Archer [mailto:Bob...@am...]<mailto:[mailto:Bob...@am...]> Sent: Wednesday, February 29, 2012 11:51 AM To: Chris Fouts; nan...@li...<mailto:nan...@li...> Subject: RE: Nant property passed to CC.NET for pass/fail condition? I expect it is the return value sent from nant.exe and that you can't modify it. What are you trying to do? BOb From: Chris Fouts [mailto:Chr...@ca...]<mailto:[mailto:Chr...@ca...]> Sent: Wednesday, February 29, 2012 11:40 AM To: nan...@li...<mailto:nan...@li...> Subject: [NAnt-users] Nant property passed to CC.NET for pass/fail condition? What is the nant property that is set for CC.NET to report a pass/fail condition? I assume I can modify this property? Is it nant.onfailure? Thanks! -chris ***This e-mail message is intended only for the above named recipient(s) and may contain information that is sensitive or proprietary. If you have received this message in error or are not the named recipient(s), please immediately notify the sender, delete this e-mail message without making a copy and do not disclose or relay this e-mail message to anyone.*** |