How to mark build as unstable when warning trend has arisen?

岁酱吖の 提交于 2019-12-04 03:20:49

问题


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.

An example screenshot:

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.

Thanks for any help.


回答1:


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.



来源:https://stackoverflow.com/questions/17944257/how-to-mark-build-as-unstable-when-warning-trend-has-arisen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!