How to execute more code after rescue part

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to execute more code after rescue part

Stanley Shen
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
  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.

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 [hidden email].
To view this discussion on the web visit
For more options, visit