Hudson - save artifacts only when less than 90% passes

拈花ヽ惹草 提交于 2019-12-11 19:49:35

问题


I am new at this and I was wondering how I can setup that I save the artifacts, only if less than 90% of the tests have passed.

Any idea how I can do this?

thanks


回答1:


This is not currently possible with Hudson. What is the motivation to avoid archiving artifacts on every build?




回答2:


How about a rather simple workaround. You create a post build step (or additional build step) that calls your tests from the command line. Be sure to capture all errors so Hudson don't count it as a failure. Than you evaluate your condition and set the error level accordingly. In addition you need to save reports (probably outside hudson) before you set the error level, so they are available even or only when the build fails.

My assumption here is, that it is OK, not to run the tests when building the app fails. However, you can separate the building and testing in two jobs. See here.



来源:https://stackoverflow.com/questions/1487378/hudson-save-artifacts-only-when-less-than-90-passes

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