Search code examples
jenkinsgroovyjenkins-pipelinejenkins-groovyemail-ext

Jenkins render email-ext template to use for other purpose


I have an html email template the represents my pipeline result. I'm sending the render template by:

    emailext body: '${SCRIPT, template="feedback.template"}',
        subject: "Full pipeline details",
        mimeType: 'text/html',
        to: "${config.to}"

I try to send the rendered html report also via slack by:

    slackUploadFile filePath: "<MY-rendered-html>", initialComment:  "Full Report"

I can't figure out how to get the rendered email-template html for other purpose like sending the html via slack or uploading it to somewhere else


Solution

  • You can use saveOutput: true option