当出现警告趋势时,如何将建筑物标记为不稳定? [英] How to mark build as unstable when warning trend has arisen?

查看:165
本文介绍了当出现警告趋势时,如何将建筑物标记为不稳定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们将Jenkins与MS Build结合使用来构建我们的项目.我们的项目中还有一个警告插件和大量警告. .我正在努力与这些警告作斗争.我要采取的步骤之一是,当上一个构建中的警告数量大于上一个构建中的警告数量时,将构建标记为不稳定.也许我应该走得更远,并将这种构建标记为失败,但是我认为两种标记的机械原理都是相同的.

So we use Jenkins in conjunction with MS Build to build our projects. We also have a warnings plugin and a large number of warnings in our projects. I am trying to fight with these warnings. One of the steps which I would like to take is to mark build as unstable when number of warnings in the last build is greater than in the previous one. Maybe I should go even further and mark such build as a failure but I guess the mechanizm will be the same for both of marks.

一个示例屏幕截图:

我在网上找不到任何有关如何执行此操作的信息.我知道有一些用于扫描日志文件的插件,但是这些插件还必须扫描以前版本的日志,并允许我计算警告之间的差异.

I could not find any info on the web how to do this. I know that some plugins for scanning log files exist, but those plugins would have to also scan logs from previous build and allow me to calculate difference in warnings.

感谢您的帮助.

推荐答案

警告插件确实具有某些功能.在"高级... "设置下,有两个配置选项可供查看:

The warnings plugin does have some capability to do some of this. Under the "Advanced..." settings, there are two configuration options to look at:

  • 运行状况阈值-配置构建运行状况的阈值"
  • 状态阈值-如果警告总数大于这些阈值之一,则构建被视为不稳定或失败."
  • Health Thresholds - "Configure the thresholds for build health"
  • Status Thresholds - "If the number of total warnings is greater than one of these thresholds then a build is considered as unstable or failed."

如果您随后选中"计算新警告"复选框,则可以选择基于新警告设置状态阈值.

If you then check the "Compute new warnings" checkbox, you will get an option to set the status thresholds based on new warnings.

这篇关于当出现警告趋势时,如何将建筑物标记为不稳定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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