Want to add the HTML report as an attachment in mail in Jenkins Pipeline post actions

410 Views Asked by At

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'
0

There are 0 best solutions below