How to execute more code after rescue part

8 views
Skip to first unread message

stanle...@servicemax.com

unread,
Nov 14, 2017, 12:23:30 PM11/14/17
to Jenkins Users
Hello, all

I am having a flow job like this:


/*
 functions to parse github pull requst , and some variables for state
*/

def result = false
guard {
  job1 . ###  will be failed
  job2
  result = true
} rescue {

}

if (result) {
  add comment to pull request
  set build to SUCCESS
} else {
  add comment to pull request too
  set build to FAILURE
}


It works in most case and it doesn't work when there are errors in jobs.
After code in resuce part is executed, the next code is not executed at all.



Any suggestion on it, how can I handle it?

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages