如何编写一个分析声纳输出的 Jenkins 插件?
任何人都可以建议编写 Jenkins/Hudson 插件的最佳方法,该方法将分析“Sonar”操作的输出吗?
我的想法是我想做这样的事情:
a. Checkout Code > b. Run Sonar > c. Email the developers their violations
现在,你会如何编写 c. 部分?我不知道从哪里开始。
有人是 Jenkins 插件方面的专家吗?
Can anyone suggest the best approach to writing a Jenkins/Hudson plugin, that will analyse the output of a "Sonar" action?
The idea is that I want to do something like this:
a. Checkout Code > b. Run Sonar > c. Email the developers their violations
Now, how would you write the c. part? I am not sure where to start.
Is anyone an expert in Jenkins plugins?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 "Build Breaker" Sonar 插件 来破坏 Jenkins 构建检测到违规行为。
You could use the "Build Breaker" Sonar plugin to break the Jenkins build whenever it detects a violation.
我要做的第一件事是编写代码来查找每个开发人员的(新)违规行为。为此,您需要一些声纳知识。
然后看一下一个插件,它可以完成与您想要完成的任务类似的任务。由于您想作为构建后步骤发送邮件,我建议您查看 ext-email 插件。
Jenkins Wiki 中的 插件教程 是一个非常好的起点让您做好开始编码的准备。
顺便说一句,很棒的插件想法,我对由此产生的插件非常感兴趣:-)
The first thing I would do is to write the code that will find the (new) violations for each developer. For this you need some Sonar knowledge.
Then take a look at a plugin that does something similar to what you want to accomplish. As you want to send mails as a post-build step, I would suggest taking a look at the ext-email Plugin.
The Plugin-Tutorial in the Jenkins Wiki is a very good starting point to get you set up to start coding.
Great plugin idea btw, I'm very interested in the resulting plugin :-)