我可以配置 jenkins 发送包含静态分析报告摘要的电子邮件吗?
我想在构建完成后发送一封电子邮件,其中包含运行报告(PMD、Checkstyle、Findbugs、Cobertura)中的一些数据,例如问题数量、新问题、覆盖范围等。
这可能吗?
I'd like to send an email after a build completes with some data from the reports that are run (PMD, Checkstyle, Findbugs, Cobertura) such as number of issues, new issues, coverage etc.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试一下!更多内容请查看我的要点:https://gist.github.com/yangboz/9204868
Have a try! More check my gist here: https://gist.github.com/yangboz/9204868
我已经设法使用 email-ext 插件获取一些数据。您需要在发送的电子邮件中包含一个 jelly 文件,如下所示:
有一个默认模板 (
html.jelly
),其中包括 junit 和 Cobertura 结果,我通过添加如下内容对其进行了修改:对于 PMD和 CheckStyle 您可以执行类似的操作:
我还没有找到一种方法来包含结果的低/中/高优先级数字。
I've managed to get some data using the email-ext plugin. You need to include a jelly file in the email sent like this:
There is a default template (
html.jelly
) which includes junit and Cobertura results which I've modified by adding something like this:For PMD and CheckStyle you can do something similar with:
I've not yet found a way to include the low/medium/high priority figures for the results.
就我而言,工作 https://stackoverflow.com/a/22008267/1688570
对于确切的操作名称,请查看 \Jenkins\ jobs\fispp-all-master\builds\${buildNumber}\build.xml 文件。
即我必须使用 hudson.plugins.findbugs.FindBugsMavenResultAction 来显示正确的结果。
In my case worked https://stackoverflow.com/a/22008267/1688570
For exact Action names look in \Jenkins\jobs\fispp-all-master\builds\${buildNumber}\build.xml file.
I.e. I had to use hudson.plugins.findbugs.FindBugsMavenResultAction to show correct results.