I’m losing hope….

build_result = build(“job1");
if ( build_result.build.getResult().equals("SUCCESS") ) {
  build_result = build("job2”);
  <…more stuff here...>
} else {
    throw new Exception(“FAIL!”);
}

When br contains the string “SUCCESS”, the if…else evaluates to else...every 
time!  If I println( br.equals(“SUCCESS”) );, it evaluates to false every time, 
which matches the if..else evaluation.

This is fighting me every step of the way.  The concurrent throttle plugin 
doesn’t seem to work as I’d expect…I just want a try/catch!

Might have to just do what I need using Python and leave Jenkins out of the 
decision-making process altogether!

On Jan 10, 2014, at 11:01 AM, Ginga, Dick <dick.gi...@perkinelmer.com> wrote:

> Well, I just use it as a condition test for a further build step. Because I 
> am testing the result of 1 of 2 parallel builds the build flow returns the 
> combined status.
> 
> Maybe return(FAILURE) will work
> 
> -----Original Message-----
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Daniel Beck
> Sent: Friday, January 10, 2014 10:41 AM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: Failing a Build Flow
> 
> 
> On 10.01.2014, at 16:26, "Ginga, Dick" <dick.gi...@perkinelmer.com> wrote:
> 
>> My 2 cents worth not being a Groovy programmer but I use the build flow.
>> 
>> You can call build like this :
>> 
>> A = build("buildA")
>> 
>> From A you can get the status:
>> 
>> Aresult = A.build.getResult()
> 
> How'd you set the build flow's result based on that?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to