Sorry, I don't have a good answer, but AFAIK the Build Flow plugin isn't really in development any more — you should be able to achieve what you're looking for with the Pipeline plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin

Regards,
Chris


On 13/03/16 09:20, Jayan M N wrote:

Here is my FlowScript. `dev.AlwaysFail` is job that will always fail.


def afterFail=false;
def afterFail_2= false;
guard {
     b = build( "dev.AlwaysFail" )
     out.println ("must not appear")//executed even after the error.
     afterFail = true; //executed even after the error.
     b = build( "dev.AlwaysFail" )
     afterFail_2 = true;
} rescue {
     out.println afterFail
     out.println afterFail_2
}

Result from execution
=============

guard {
     Schedule jobdev.AlwaysFail <http://localhost:8080/job/dev.AlwaysFail/>
     Builddev.AlwaysFail #3 <http://localhost:8080/job/dev.AlwaysFail/3/>  
started
     dev.AlwaysFail #3 <http://localhost:8080/job/dev.AlwaysFail/3/>  completed 
 : FAILURE
must not appear
} rescue {
true
false
}
Finished: FAILURE

=====================



Is there a way to directly execute "guard" when build triggered from flow 
execute?


Thanks,

Jayan

--
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
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/3a5b966a-410d-4ea1-ba1c-da8e9cb93083%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/3a5b966a-410d-4ea1-ba1c-da8e9cb93083%40googlegroups.com?utm_medium=email&utm_source=footer>.
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/56E9FC68.2090808%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to