Jenkins邮件模板
模板一:
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title> 6 </head> 7 8 <body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" 9 offset="0"> 10 <table width="95%" cellpadding="0" cellspacing="0" 11 style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif"> 12 <tr> 13 <td>本邮件是Jenkins自动发送,请勿回复!</td> 14 </tr> 15 <tr> 16 <td><h3> 17 <font color="#e53935">    构建结果 - ${BUILD_STATUS}!</font> 18 </h3></td> 19 </tr> 20 <tr> 21 <td><br /> 22 <b><font color="#3f51b5">构建信息:</font></b> 23 <hr size="2" width="100%" align="center" /></td> 24 </tr> 25 <tr> 26 <td> 27 <ul> 28 <li>项目名称:${PROJECT_NAME}</li> 29 <li>构建编号:第${BUILD_NUMBER}次构建</li> 30 <li>构建状态:${BUILD_STATUS}</li> 31 <li>触发原因:${CAUSE}</li> 32 <li>项目Url: 33 <a href="${PROJECT_URL}">${PROJECT_URL}</a></li> 34 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 35 </a> 36 </li> 37 <li>测试报告: <a href="${PROJECT_URL}HTML_20Report">${PROJECT_URL}HTML_20Report</a></li> 38 <li>所有用例: ${TEST_COUNTS,var="total"}</li> 39 <li>成功用例: ${TEST_COUNTS,var="pass"}</li> 40 <li>失败用例: ${TEST_COUNTS,var="fail"}</li> 41 <li>跳过用例: ${TEST_COUNTS,var="skip"}</li> 42 <li>构建日志:<a href="${BUILD_URL}console">${BUILD_URL}console</a></li> 43 </ul> 44 </td> 45 <tr> 46 <td><b><font color="#3f51b5">构建日志:</font></b> 47 <hr size="2" width="100%" align="center" /></td> 48 </tr> 49 <tr> 50 <td><textarea cols="160" rows="80" readonly="readonly" 51 style="font-family: Microsoft YaHei">${BUILD_LOG,maxLines=1000}</textarea> 52 </td> 53 </tr> 54 </html>
模板二: