Hi,

Yes, in your pipeline script, you need to catch exceptions for what you
want to do.  Be careful, if the build fails, you will need to set
currentBuild.status and re-throw the exception in order for the build to be
marked as failed.

Look at this example which I wrote:
https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy

--
Craig

On Thu, May 5, 2016 at 12:24 PM, Mike Caspar <m...@caspar.com> wrote:


> try {
> step 1
> step 2
> step 3
> step 4
> step 4
> }
> catch
> {
> task {send email of build status}
> }
> finally
> {
> task {send email of build status}
> }
>
>

-- 
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/CAG%3DrPVfqa72x317P1OO9zZnyvmP73vPcQyoH7PsH7OVfaRTRmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to