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