詹金斯(Jenkins)能否向我显示每月损坏建筑物的总数/百分比? [英] Can Jenkins show me the total number/percent of broken builds per month?

查看:37
本文介绍了詹金斯(Jenkins)能否向我显示每月损坏建筑物的总数/百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Jenkins服务器,可以构建/测试大约50个项目.不幸的是,其中一些构建失败了,但是我没有一个好的方法来衡量构建失败是随时间增加还是减少.

I have a Jenkins server that builds/tests about 50 projects. Unfortunately, some of these builds fail, but I don't have a good way to measure whether build failures are increasing or decreasing in frequency over time.

我想要的是以下几句话:

What I'd like is something along these lines:

  • 一份报告,显示我在一个月的时间内有多少工作不稳定/失败
  • 一份报告,上面写着"X天不间断建筑"(有点像建筑工地上的东西)
  • 红色/绿色日历",它将每天显示是否有任何内部版本被破坏

我没有看到任何以这些方式可视化数据的插件,但我愿意刮擦Jenkins日志以获取信息.有没有更好的方法来查看与此类似的数据?

I didn't see any plugins that visualized data in any of these ways, but I'm willing to scrape the Jenkins logs to get the information. Is there a better way to see data similar to this?

推荐答案

我认为使用API​​可以正常工作.您可以从视图中获取所有作业,然后进入作业详细信息并获取内部版本号和内部日期.使用这些内部版本号,您可以获得相应的状态.您可能需要进行一些编码才能收集和显示数据,但这是一种可能的方法.

I think this work pretty decent using the API. You can get all jobs from your view, then go into the job details and get the build numbers and build date. With those build numbers you can get the corresponding status. You would have to do some coding to collect and display the data, but this would be a possible way.

另一种可能性是在Manage Jenkins中的控制台上使用Groovy脚本.虽然我对使用该功能没有太多经验,但是当您可以使用内部表示形式时,从那里获取一些数据应该很容易.

Another possibility would be using a Groovy script over the console in Manage Jenkins. I do not have much experience working with that feature though, but as you have access to the internal representation it should be pretty easy to get some data out of there.

最后,最佳解决方案是编写一个可以完成工作的插件,但这当然也是需要最大努力和专业知识的解决方案.

Finally, the optimal solution would be to write a plugin that does the work, but this is of course also the solution that requires the most effort and know-how.

这篇关于詹金斯(Jenkins)能否向我显示每月损坏建筑物的总数/百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆