Jenkins:通过电子邮件发送XML API内容

时间:2020-01-20 11:07:14

标签: jenkins junit jenkins-plugins jenkins-email-ext

Jenkins提供XML API,以查看与构建相关的状态:

例如:URL/job/JOBNAME/lastCompletedBuild/testReport/api/xml将显示最新版本的测试结果。

是否可以通过电子邮件发送此页面/ api的内容?

如果为NOT,则可以这样在电子邮件中仅发送Junit状态摘要(软件包/套件)(此视图在URL/job/JOBNAME/lastCompletedBuild/testReport/api/xml上可见):

enter image description here

(通过“发布电子邮件”报告生成的报告非常大,并且通过${FILE, "index.html"}发送该报告会导致电子邮件非常大且难看。而且我没有使用testNg。)

1 个答案:

答案 0 :(得分:0)

使用带常规模板的email-ext插件。有关stackoverflow https://stackoverflow.com/a/41803890/1391012

的详细解答,