How to categorize build failures with jenkins?
build-automation, hudson, jenkins
Solution
The Build Failure Analyzer plugin lets you set regular expressions for categorizing current and future builds. Once the regular expressions have been set, detection is automatic for current and future builds. This may be exactly what you're after.
I have also implemented a lightweight, manual failure categorization plug-in for Jenkins, which provides a simple drop-down and additional text field for categorizing failures by hand. This was done for a research project studying build failures. Categorizations are currently saved as separate XMLs in each build's directory, to have no impact on Jenkins' own files. Categories are displayed in build listings and in a separate categorization page for each build.
I regret to say that the plugin is not currently shared anywhere, as it contains some hard-codings for a specific project. If there is demand for such a plug-in, I can re-visit the code and publish it open source. However, for your purposes it seems like the automatic solution of Build Failure Analyzer would be more suitable.
The plug-in is very simple and similar things are not hard to implement. If you wish to make something similar yourself, or perhaps extend the automated Build Failure Analyzer plug-in to fit your needs, the Jenkins plugin tutorial and Extend Jenkins pages are a good starting point for Jenkins plug-in development. For persistence, getting familiar with XStream would be beneficial, as that is what Jenkins and most plug-ins internally use to serialize data to XML.
Problem
I am looking for a solution that would allow us to categorize build failures like: - developer (a developer added bad code) - build system (error in the build system) - infrastructure problem (servers not responding) It would be great if this could be done automatically most of the time, based on the console output but also we need an option to make a build to be of certain status. How can we obtain this behaviour from jenkins?