1

I am now attaching the console output of my python scripts and send the mail in jenkins.The recipient gets an link to open the console output

Is there any way to send the test result dashboard directly to the email using jenkins?

Any help would be greatly appreciated.Thank you

user123
  • 11
  • 1
  • 3

2 Answers2

2

is your script generating any HTML reports, if yes, you can publish the HTML in the email body. Display HTML page inside mail body with Email-ext plugin in Jenkins

Ashokekumar S
  • 351
  • 3
  • 7
0

Add this to your pipeline with having email-ext plugin integrated with Jenkins.

post {
        fixed {
            emailext 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: 'FIXED: $PROJECT_NAME - #$BUILD_NUMBER'
        }
        failure {
            emailext 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: 'FAILED: $PROJECT_NAME - #$BUILD_NUMBER'
        }
        unstable {
            emailext 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: 'UNSTABLE: $PROJECT_NAME - #$BUILD_NUMBER'
        }
    }
KnockingHeads
  • 1,569
  • 1
  • 22
  • 42