Hi,
>From my experience Build flow do not throw an exception if the build is 
>aborted, unstable or failed, assuming the build actually started and completed 
>normally.

I assume you have checked what exception was caught.



> 3 dec 2015 kl. 10:51 skrev Valeriy Leykin <vvval...@gmail.com>:
> 
> Hi Christofer,
> 
> Actually this is exactly what is written aline before (def BUILD_TO_RETURN).
> The problem is that when build is UNSTABLE or FAILED exception is being 
> thrown without returning from the build method.
> 
> Regards,
> Valeriy
> 
>> On Wednesday, December 2, 2015 at 2:41:12 AM UTC+2, Christopher Orr wrote:
>> Hi there, 
>> 
>> On 01/12/15 14:17, Valeriy Leykin wrote: 
>> > I'm using the build flow in my jobs and I would like to get any build 
>> > result from build object even if the build is failed or unstable. 
>> 
>> I haven't used Build Flow, but I would guess that this is a basic 
>> scoping problem. 
>> 
>> BUILD_TO_RETURN is defined in the "try" block, which means it's not 
>> visible outside of that block, i.e. it won't exist and so returns `null` 
>> when the "catch" block tries to access it. 
>> 
>> Try defining your variable before the "try" block: 
>> 
>>   def BUILD_TO_RETURN 
>>   try { 
>>     BUILD_TO_RETURN = build(...) 
>>   } catch (...) { 
>>     ... 
>>   } 
>> 
>> Regards, 
>> Chris
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/fb03e2e7-4f4d-457b-a0f7-74db03a09915%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/E6EA1E1C-E05D-4D54-B3B6-C577E552B420%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to