obeh

finally

Mar 7th, 2021 (edited)
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.57 KB | None | 0 0
  1. finally {
  2.     println "finally"
  3.     showDockerLogs()
  4.     testResultLogstash()
  5.     def causes = currentBuild.rawBuild.getCauses()
  6.     for(cause in causes) {
  7.         if(cause.properties.shortDescription =~ 'Started by user') {
  8.             emailext body: "Jenkins CI \n Current result: ${currentBuild.result}" ,
  9.             recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
  10.             subject: 'Jenkins CI GIT Branch: ${GIT_BRANCH} ',
  11.             to: env['committerEmail']
  12.             break
  13.         }
  14.     }  
  15. }
  16.  
Add Comment
Please, Sign In to add comment