Hudson - save artifacts only when less than 90% pa

2019-08-16 00:59发布

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

2条回答
我命由我不由天
2楼-- · 2019-08-16 01:00

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

查看更多
ゆ 、 Hurt°
3楼-- · 2019-08-16 01:00

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.

查看更多
登录 后发表回答