fix(jenkins): 修复jenkins执行通知内容

--bug=1008340 --user=刘瑞斌 【jenkins插件】通知问题汇总 https://www.tapd.cn/55049933/s/1075016
This commit is contained in:
CaptainB 2021-11-25 13:03:05 +08:00 committed by 刘瑞斌
parent bc80ce7cbe
commit dd2571e476
4 changed files with 15 additions and 21 deletions

View File

@ -76,7 +76,7 @@ public class PerformanceNoticeEvent implements LoadTestFinishEvent {
NoticeModel noticeModel = NoticeModel.builder()
.operator(loadTestReport.getUserId())
.successContext(successContext)
.successMailTemplate("PerformanceApiSuccessNotification")
.successMailTemplate("PerformanceSuccessNotification")
.failedContext(failedContext)
.failedMailTemplate("PerformanceFailedNotification")
.testId(loadTestReport.getTestId())

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MeterSphere</title>
</head>
<body style="text-align: left">
<div style="text-align: left">
<p>尊敬的用户:</p>
<p style="margin-left: 60px">您好:
</div>
<div style="margin-left: 100px">
<p>您所执行的 ${name} 性能测试已完成<br/>
请点击下面链接进入测试报告页面</p>
<a href="${url}/#/${type}/report/view/${id}">${url}/#/${type}/report/view/${id}</a>
</div>
</body>
</html>

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MeterSphere</title>
</head>
<body style="text-align: left">
<div style="margin-left: 100px">
${operator}执行性能测试成功: ${name}, 报告: ${reportUrl}
</div>
</body>
</html>

View File

@ -157,11 +157,11 @@ export default {
'</head>\n' +
'<body>\n' +
'<div>\n' +
'${operator}所执行的 ${name} ${type}测试运行成功' +
'${operator}执行 Jenkins 成功: ${name}' +
'</div>\n' +
'</body>\n' +
'</html>',
robotTitle: "${operator}所执行的 ${name} ${type}测试运行成功",
robotTitle: "${operator}执行 Jenkins 成功: ${name}",
jenkinsTask: [{
taskType: "jenkinsTask",
event: "",