-1
  • I have Jenkins groovy scripted pipeline job and which has multiple stages and in one of the stage it will trigger the another job and in the end it will trigger the email and it is sending email only if all the stages passed successfully and if in one of the stage has issue, pipeline is stopping execution there itself but I needs to trigger email irrespective of stage failure in groovy scripted pipeline.*
NVNK
  • 21
  • 6
  • Any one please suggest on this if any other option in scripted pipeline other than the try catch – NVNK Oct 09 '22 at 17:10

1 Answers1

1

You can wrap the execution blocks in Stages with try-catch blocks and decide what you want to do if an error occurs in the catch block.

ycr
  • 12,828
  • 2
  • 25
  • 45