Send email on jenkins pipeline failure
问题 How can i add to a jenkins pipeline an old-style post-build task which sends email when the build fails? I cannot find "Post-build actions" in the GUI for a pipeline. I know that i can wrap the entire build script try/catch, however this seems ugly when the build script is large and continues to send emails even when the job was aborted manually. I would like to achive the same functionality as with the previouse email-ext based post-build action. try { // Do sth } catch(e) { emailext body: '