Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jenkins邮件模板
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title>
</head>
<style>
.build_info_table,
.build_info_table tr th,
.build_info_table tr td {
border: 1px solid #000000;
}
a,
span {
margin: 10px;
}
</style>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<h2>
<font>来自Mr.Jenkins的邮件通知</font>
<img src="http://172.17.16.112:9040/api/project_badges/measure?project=${JOB_NAME}&metric=bugs"/>
</h2>
<table style="margin-left:20px;" width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td>
<b>
<font color="#0B610B">构建信息</font>
</b>
<hr size="2" width="100%" align="center" />
</td>
</tr>
<tr>
<td>
<table class="build_info_table" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><span>项目名称&nbsp;:</span></td>
<td><span>${PROJECT_NAME}</span></td>
</tr>
<tr>
<td><span>触发原因&nbsp;:</span></td>
<td><span>${CAUSE}</span></td>
</tr>
<tr>
<td><span>构建日志&nbsp;:</span></td>
<td><a href="${BUILD_URL}console">${BUILD_URL}console</a></td>
</tr>
<tr>
<td><span>工作目录&nbsp;:</span></td>
<td><a href="${PROJECT_URL}ws">${PROJECT_URL}ws</a></td>
</tr>
<tr>
<td><span>扫描结果&nbsp;:</span></td>
<td><a href="http://172.17.16.112:9040/dashboard?id=${PROJECT_NAME}">http://172.17.16.112:9040/dashboard?id=${PROJECT_NAME}</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<b>
<font color="#0B610B">构建日志:</font>
</b>
<hr size="2" width="100%" align="center" />
</td>
</tr>
<tr>
<td>
<textarea style="width:100%;" rows="30" readonly="readonly" style="font-family: Courier New">${BUILD_LOG}</textarea>
</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title>
</head>
<style>
.build_info_table,
.build_info_table tr th,
.build_info_table tr td {
border: 1px solid #000000;
}
a,
span {
margin: 10px;
}
</style>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<h2>
<font>来自Mr.Jenkins的邮件通知</font>
</h2>
<table style="margin-left:20px;" width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td>
<b>
<font color="#0B610B">构建信息</font>
</b>
<hr size="2" width="100%" align="center" />
</td>
</tr>
<tr>
<td>
<table class="build_info_table" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><span>项目名称&nbsp;:</span></td>
<td><span>${PROJECT_NAME}</span></td>
</tr>
<tr>
<td><span>触发原因&nbsp;:</span></td>
<td><span>${CAUSE}</span></td>
</tr>
<tr>
<td><span>构建日志&nbsp;:</span></td>
<td><a href="${BUILD_URL}console">${BUILD_URL}console</a></td>
</tr>
<tr>
<td><span>工作目录&nbsp;:</span></td>
<td><a href="${PROJECT_URL}ws">${PROJECT_URL}ws</a></td>
</tr>
<tr>
<td><span>安装包下载&nbsp;:</span></td>
<td><a href="${URL_PACKAGE}">${URL_PACKAGE}</a></td>
</tr>
<tr>
<td><span>安装包站点&nbsp;:</span></td>
<td><a href="http://172.17.16.51:9000/app_archive/">http://172.17.16.51:9000/app_archive/</a></td>
</tr>
<tr>
<td><span>扫码下载&nbsp;:</span></td>
<td><img src="http://qr.liantu.com/api.php?bg=f3f3f3&fg=ff0000&gc=222222&el=l&w=200&m=10&text=${URL_SCAN}" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<b>
<font color="#0B610B">构建日志:</font>
</b>
<hr size="2" width="100%" align="center" />
</td>
</tr>
<tr>
<td>
<textarea style="width:100%;" rows="30" readonly="readonly" style="font-family: Courier New">${BUILD_LOG}</textarea>
</td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.