There's no built in plugin that will do it. However, you should be able to get
the time a build started, the time it finished, and then calculate how long it
took.
Once you do that you can run the following command (using the Jenkins Command
Line Tool):
java -jar jenkins-cli.jar set-build-result unstable
I believe the command line tool is inside the Jenkins war file.
On Feb 15, 2012, at 4:34 AM, Johannes Wienke <[email protected]>
wrote:
> Hey everyone,
>
> we have a job which performs some custom coding style checking on some
> files. As the result format my custom checker produces checkstyle XML
> output.
>
> What we would like to have is that committers are notified by mail each
> time they introduce a new style warning.
>
> I could achieve something like that by using the advanced settings of
> the checkstyle plugin for jenkins and setting the unstable threshold for
> new warnings to 0 ("Status thresholds (New warnings)"). This now marks
> the build as unstable each time I commit a new warning.
>
> However, what confuses me is that the build remains unstable until this
> warning is actually fixed. I would have though that the build gets only
> unstable once and if I rebuild the project I am back to stable. I do not
> want to use the delta computation as it might prevent mails for new
> warnings from being sent.
>
> Can anyone explain this behavior to me?
>
> As I might produce some output with my custom checker, which could not
> be fully compatible with the expectations of the checkstyle pluign, it
> would also be good to know which rules are applied by the plugin to
> decide if a warning is new or not.
>
> Thanks for any help.
> Johannes
>