1

I want to add the Generated Html report in the mail when using Jenkins pipeline post actions. Path of the HTML reports in the workspace : /var/lib/jenkins/workspace/State_Check_Listings_Live_Apartmentlove/22/execution/node/3/ws/automation-report/reports/07-11-2022/

But I'm not getting any attachments in the mail please help Using declarative pipeline script

Used script in post actions

emailext mimeType: 'text/html',
                    attachmentsPattern: "</var/lib/jenkins/workspace/State_Check_Listings_Live_Apartmentlove/28/execution/node/3/ws/automation-report/reports/07-11-2022/>", 
                    body:'Check console output at $BUILD_URL to view the results. \n\n ${CHANGES} \n\n -------------------------------------------------- \n${BUILD_LOG, maxLines=100, escapeHtml=false}', 
                    to: "${EMAIL_TO}", 
                    subject: 'Stage Second Fails in Jenkins: $PROJECT_NAME - #$BUILD_NUMBER'
Test Netz
  • 11
  • 1
  • This should help https://stackoverflow.com/questions/22066936/display-html-page-inside-mail-body-with-email-ext-plugin-in-jenkins – Sourav Nov 07 '22 at 11:23
  • by the way, if you'd like to have the console log of the run attached, add this `,attachLog: true,` to the emailext. – ShaharT Nov 07 '22 at 21:53

0 Answers0