My project has a number of packages (“models”, “controllers”, etc.). I’ve set up Jenkins with the Cobertura plugin to generate coverage reports, which is great. I’d like to mark a build as unstable if coverage drops below a certain threshold, but only on certain packages (e.g., “controllers”, but not “models”). I don’t see an obvious way to do this in the configuration UI, however — it looks like the thresholds are global.
Is there a way to do this?
(Answering my own question here)
As far as I can tell, this isn’t possible — I haven’t seen anything after a couple days of looking. I wrote a simple script that would do what I want — take the coverage output, parse it, and fail the build if coverage of specific packages didn’t meet certain thresholds. It’s dirty and can be cleaned up/expanded, but the basic idea is here. Comments are welcome.