I am new to Jenkins and have been trying to implement a custom plugin for Jenkins that will change the criteria used to establish how healthy a build is.
I have looked through the source code and from what I can see the build health is calculated in the Job class (getBuildStabilityHealthReport()) by evaluating how many of the past 5 builds failed. This is then stored in a HealthReport object that is associated with that particular build. I basically wanted to change the criteria by which a build is evaluated as healthy/unhealthy. As I can see the easiest way to achieve this would be to create my own HealthReport (with a score based on my criteria) and attach it to a completed build, however, as far as I can see, there doesn't seem to be any way of attaching a custom HealthReport to a build. Firstly is my understanding of how Jenkins calculates the health of a build correct? Secondly is there a way to attach a custom HealthReport to a build? If not what would be the best way of altering how Jenkins calculates the health of a build? The reasoning behind this is to get more granularity into the result of a particular build, rather than simply pass/fail or unstable. Many thanks
