SUCCESS and FAILURE are constants, you don't need to do string comparisons.
On Fri, Jan 10, 2014 at 9:06 AM, silver <[email protected]> wrote: > 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 <[email protected]> > 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: [email protected] [mailto: > [email protected]] On Behalf Of Daniel Beck > > Sent: Friday, January 10, 2014 10:41 AM > > To: [email protected] > > Subject: Re: Failing a Build Flow > > > > > > On 10.01.2014, at 16:26, "Ginga, Dick" <[email protected]> > 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 [email protected]. > > 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 [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- Marc MacIntyre -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
