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/565E3E1E.2050208%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to