0

I have configured jenkins to send mail to specific people for every build. I want to send test report along with text. How to do that? If you can help.

hemant patel
  • 114
  • 4

2 Answers2

1

Simply use Email-ext plugin - https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin and use it in jenkins job 'editable email notification'

0
emailext subject: "FAILED: Job '\${env.JOB_NAME} [\${env.BUILD_NUMBER}]'",
                                                                   mimeType: "text/html",
                                                                   body: \"""Job '\${env.JOB_NAME} - Build # [\${env.BUILD_NUMBER}]' - FAILED:</p>
                                                                        <p>Check console output at &QUOT;<a href='\${env.BUILD_URL}'>\${env.JOB_NAME} [\${env.BUILD_NUMBER}]</a>&QUOT;</p>
                                                                        <p>Check test results at &QUOT;<a href='\${env.BUILD_URL}cucumber-html-reports/overview-features.html'>Cucumber reports</a>&QUOT;</p>\""",
                                                                   to:'user1@gmail.com,user2@gmail.com'

if you use a pipeline job here is an example

Ibtissam
  • 509
  • 3
  • 8
  • 21