Re: Nant property passed to CC.NET for pass/fail condition?
Chris Fouts <[email protected]> Mon, 19 Mar 2012 17:49:39 -0400
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <[email protected]> |
--===============3087577395446488747==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967B51680srv584caemilu_"
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967B51680srv584caemilu_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
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 ccn=
et 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:[email protected]]
Sent: Wednesday, February 29, 2012 3:15 PM
To: [email protected]
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail cond=
ition?
Thanks Adam and Bob.
From: Adam Bruss [mailto:[email protected]]
Sent: Wednesday, February 29, 2012 1:45 PM
To: [email protected]
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail cond=
ition?
Nant has an if task that can check the values of properties. Then you can u=
se 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: [email protected]
W: http://www.awrcorp.com<http://www.awrcorp.com/>
From: Chris Fouts [mailto:[email protected]]
Sent: Wednesday, February 29, 2012 11:05 AM
To: [email protected]
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail cond=
ition?
I build TWO projects in one nant.build project file, say project1 and proje=
ct2, that share a LOT of common files; hence, for NOW, I want to keep it th=
is way.
I do this
Set properties project1_ok=3Dfalse and project2_ok=3Dfalse
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=3Dtrue
Continue building project2-specific files
If project2-specific files build
Project2_ok=3Dtrue
nant_pass_fail_property =3D 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:[email protected]]<mailto:[mailto:Bob.Archer@ams=
i.com]>
Sent: Wednesday, February 29, 2012 11:51 AM
To: Chris Fouts; [email protected]<mailto:[email protected]=
ourceforge.net>
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 modif=
y it. What are you trying to do?
BOb
From: Chris Fouts [mailto:[email protected]]<mailto:[mailto:Chris.F=
[email protected]]>
Sent: Wednesday, February 29, 2012 11:40 AM
To: [email protected]<mailto:[email protected]=
t>
Subject: [NAnt-users] Nant property passed to CC.NET for pass/fail conditio=
n?
What is the nant property that is set for CC.NET to report a pass/fail cond=
ition? 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.***
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967B51680srv584caemilu_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span style=3D'c=
olor:#1F497D'>I thought I had this figured out.<o:p></o:p></span></p><p cla=
ss=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span></p><p=
class=3DMsoNormal><span style=3D'color:#1F497D'>I see that I’m calli=
ng my <fail> task in my Nant script. I see it in my ccnet console<o:p=
></o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p>&=
nbsp;</o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>fa=
il:<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'=
><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F4=
97D'> [echo] ******** BUILD FAILED! ******<o:p></o:=
p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> =
</o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>BUILD S=
UCCEEDED - 1 non-fatal error(s), 2 warning(s)<o:p></o:p></span></p><p class=
=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span></p><p c=
lass=3DMsoNormal><span style=3D'color:#1F497D'>Total time: 25.8 seconds.<o:=
p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p>=
</o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>B=
ut how come ccnet still says “BUILD SUCCEEDED”?<o:p></o:p></spa=
n></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p><=
/span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>-chris<o:p></o=
:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> =
;</o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p>&=
nbsp;</o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o=
:p> </o:p></span></p><div><div style=3D'border:none;border-top:solid #=
B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span style=
=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><sp=
an style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Chris Fout=
s [mailto:[email protected]] <br><b>Sent:</b> Wednesday, February 2=
9, 2012 3:15 PM<br><b>To:</b> [email protected]<br><b>Subjec=
t:</b> Re: [NAnt-users] Nant property passed to CC.NET for pass/fail condit=
ion?<o:p></o:p></span></p></div></div><p class=3DMsoNormal><o:p> </o:p=
></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>Thanks Adam and Bob=
.<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><=
o:p> </o:p></span></p><div><div style=3D'border:none;border-top:solid =
#B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span styl=
e=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><s=
pan style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Adam Brus=
s [mailto:[email protected]] <br><b>Sent:</b> Wednesday, February 29, 2012=
1:45 PM<br><b>To:</b> [email protected]<br><b>Subject:</b> =
Re: [NAnt-users] Nant property passed to CC.NET for pass/fail condition?<o:=
p></o:p></span></p></div></div><p class=3DMsoNormal><o:p> </o:p></p><p=
class=3DMsoNormal><span style=3D'color:#1F497D'>Nant has an if task that c=
an check the values of properties. Then you can use the <fail> task t=
o fail the build if a property matches some value. Use </span><span style=
=3D'font-size:9.0pt;font-family:"Verdana","sans-serif";color:black;backgrou=
nd:white'>resultproperty of the exec task to get the return value of your b=
uild.</span><span style=3D'color:#1F497D'><o:p></o:p></span></p><p class=3D=
MsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span></p><p clas=
s=3DMsoNormal><span style=3D'color:#1F497D'>if: </span><a href=3D"http://na=
nt.sourceforge.net/release/0.85/help/tasks/if.html">http://nant.sourceforge=
.net/release/0.85/help/tasks/if.html</a><o:p></o:p></p><p class=3DMsoNormal=
><o:p> </o:p></p><p class=3DMsoNormal>fail: <a href=3D"http://nant.sou=
rceforge.net/release/0.85/help/tasks/fail.html">http://nant.sourceforge.net=
/release/0.85/help/tasks/fail.html</a><span style=3D'color:#1F497D'><o:p></=
o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p>&nbs=
p;</o:p></span></p><div><p class=3DMsoNormal><span style=3D'font-size:10.0p=
t;font-family:"Arial","sans-serif";color:#1F497D'>Adam Bruss<o:p></o:p></sp=
an></p><p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Ar=
ial","sans-serif";color:#1F497D'>Senior Development Engineer</span><span st=
yle=3D'color:#1F497D'><o:p></o:p></span></p><p class=3DMsoNormal><span styl=
e=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>AWR C=
orporation<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-si=
ze:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>11520 N. Port Was=
hington Rd., Suite 201</span><span style=3D'color:#1F497D'><o:p></o:p></spa=
n></p><p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Ari=
al","sans-serif";color:#1F497D'>Mequon, WI 53092 USA</span><spa=
n style=3D'color:#1F497D'><o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>P=
: 1.262.240.0291 x104<o:p></o:p></span></p><p class=3DMsoNormal><span style=
=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>F: 1.2=
62.240.0294<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-s=
ize:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>E: <a href=3D"ab=
[email protected]">[email protected]</a></span><span style=3D'color:#1F497D=
'><o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-size:10.0p=
t;font-family:"Arial","sans-serif";color:#1F497D'>W: </span><span style=3D'=
color:#1F497D'><a href=3D"http://www.awrcorp.com/"><span style=3D'font-size=
:10.0pt;font-family:"Arial","sans-serif"'>http://www.awrcorp.com</span></a>=
<o:p></o:p></span></p></div><p class=3DMsoNormal><span style=3D'color:#1F49=
7D'><o:p> </o:p></span></p><div><div style=3D'border:none;border-top:s=
olid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span=
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span><=
/b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Chri=
s Fouts [mailto:[email protected]] <br><b>Sent:</b> Wednesday, Febr=
uary 29, 2012 11:05 AM<br><b>To:</b> [email protected]<br><b=
>Subject:</b> Re: [NAnt-users] Nant property passed to CC.NET for pass/fail=
condition?<o:p></o:p></span></p></div></div><p class=3DMsoNormal><o:p>&nbs=
p;</o:p></p><p class=3DMsoNormal>I build TWO projects in one nant.build pro=
ject file, say project1 and project2, that share a LOT of common files; hen=
ce, for NOW, I want to keep it this way.<o:p></o:p></p><p class=3DMsoNormal=
><o:p> </o:p></p><p class=3DMsoNormal>I do this<o:p></o:p></p><p class=
=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Set properties proje=
ct1_ok=3Dfalse and project2_ok=3Dfalse<o:p></o:p></p><p class=3DMsoNormal><=
o:p> </o:p></p><p class=3DMsoNormal>Build project1 and project2 shared=
files<o:p></o:p></p><p class=3DMsoNormal>If project1 and project2 shared f=
iles fail<o:p></o:p></p><p class=3DMsoNormal> Stop the build an=
d report failure<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p=
class=3DMsoNormal>Continue building project1-specific files<o:p></o:p></p>=
<p class=3DMsoNormal>If project1-specific files build<o:p></o:p></p><p clas=
s=3DMsoNormal> project1_ok=3Dtrue<o:p></o:p></p><p class=3DMsoN=
ormal><o:p> </o:p></p><p class=3DMsoNormal>Continue building project2-=
specific files<o:p></o:p></p><p class=3DMsoNormal>If project2-specific file=
s build<o:p></o:p></p><p class=3DMsoNormal> Project2_ok=3Dtrue<=
o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNorma=
l>nant_pass_fail_property =3D project1_ok AND project2_ok<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>So if either pr=
oject1_ok or project2_ok is false, I want ccnet to report a failure.<o:p></=
o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Make=
sense?<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3D=
MsoNormal>-chris<o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p=
></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal> &=
nbsp; <span style=3D'color:#1F497D'><o:p></o:p></span></p><p class=3DMsoNor=
mal><span style=3D'color:#1F497D'><o:p> </o:p></span></p><div><div sty=
le=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'=
><p class=3DMsoNormal><b><span style=3D'font-size:10.0pt;font-family:"Tahom=
a","sans-serif"'>From:</span></b><span style=3D'font-size:10.0pt;font-famil=
y:"Tahoma","sans-serif"'> Bob Archer <a href=3D"mailto:[mailto:Bob.Archer@a=
msi.com]">[mailto:[email protected]]</a> <br><b>Sent:</b> Wednesday, Febr=
uary 29, 2012 11:51 AM<br><b>To:</b> Chris Fouts; <a href=3D"mailto:nant-us=
[email protected]">[email protected]</a><br><b>Subje=
ct:</b> RE: Nant property passed to CC.NET for pass/fail condition?<o:p></o=
:p></span></p></div></div><p class=3DMsoNormal><o:p> </o:p></p><p clas=
s=3DMsoNormal><span style=3D'color:#1F497D'>I expect it is the return value=
sent from nant.exe and that you can’t modify it. What are you trying=
to do?<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F4=
97D'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'color:=
#1F497D'>BOb<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color=
:#1F497D'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'c=
olor:#1F497D'><o:p> </o:p></span></p><div style=3D'border:none;border-=
left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style=3D'border:=
none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DM=
soNormal><b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-seri=
f"'>From:</span></b><span style=3D'font-size:10.0pt;font-family:"Tahoma","s=
ans-serif"'> Chris Fouts <a href=3D"mailto:[mailto:[email protected]=
m]">[mailto:[email protected]]</a> <br><b>Sent:</b> Wednesday, Febr=
uary 29, 2012 11:40 AM<br><b>To:</b> <a href=3D"mailto:[email protected]=
rceforge.net">[email protected]</a><br><b>Subject:</b> [NAnt=
-users] Nant property passed to CC.NET for pass/fail condition?<o:p></o:p><=
/span></p></div></div><p class=3DMsoNormal><o:p> </o:p></p><p class=3D=
MsoNormal>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!<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=
=3DMsoNormal>-chris<o:p></o:p></p><p class=3DMsoNormal><span style=3D'font-=
size:12.0pt;font-family:"Courier New"'><br><br><br>***This e-mail message i=
s intended only for the above named recipient(s)<br>and may contain informa=
tion that is sensitive or proprietary. If you have<br>received this message=
in error or are not the named recipient(s), please <br>immediately notify =
the sender, delete this e-mail message without making<br>a copy and do not =
disclose or relay this e-mail message to anyone.***</span><span style=3D'fo=
nt-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p=
></div></div></body></html>=
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967B51680srv584caemilu_--
--===============3087577395446488747==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
--===============3087577395446488747==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
--===============3087577395446488747==--