Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fire an alert when a Jenkins job runs for too long?

I want to be alerted when my Jenkins jobs run for too long. I didn't find such a plugin, do you know of such a plugin, or another way to do it?

Thanks!

like image 457
Avi Y Avatar asked Sep 20 '15 08:09

Avi Y


1 Answers

As far as I know there is no such plugin or configuration available. There is buildtimeout-plugin, which will abort the build on a given timeout, but AFAIK doesn't support just giving an alert and not aborting.

if you're willing to make a custom build of the plugin, it might be reasonable to extend that yourself. Like you can see from its source code, it defines a general BuildTimeoutOperation interface which should be extendable to give an alert on build timeout instead of aborting a build. The existing implementations of the interface could give you some ideas on how that would be done.

like image 145
eis Avatar answered Nov 01 '22 10:11

eis