Get Emails When Jobs Don't Run

27 views
Skip to first unread message

Bill Prin

unread,
Jan 15, 2016, 12:59:53 PM1/15/16
to Jenkins Users
Hey, I posted this question on Stack Overflow but I didn't get an answer yet. Trying here:


I have a nightly Jenkins job with the "Restrict where this job can be run" job checked that ties it to build agents with specific labels. Recently, there were some issues where there were no build agents with that label, so the jobs didn't run at all. However, since the job didn't run, there was no email sent that it failed, so build failures didn't surface. Is there any way to get email notifications for Jenkins builds that don't run at all?

Mark Waite

unread,
Jan 15, 2016, 1:51:54 PM1/15/16
to Jenkins Users
We used a network monitoring system to raise an alarm if any job was in the queue longer than a threshold time.  We did that by reading the HTML of the top Jenkins page and parsing the content.

It wasn't a terribly elegant solution, but it worked.

Looking back, we probably should have created a plugin and shared the plugin.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/81b3802f-552b-4e60-9391-6ec73d610233%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

geoffroy...@gmail.com

unread,
Jan 16, 2016, 11:50:11 AM1/16/16
to Jenkins Users
Hi
the solution we are using is a "cron" jenkins job, running on the master every 10min, which checks if any jobs are stuck in the build queue for a certain amount of time (let's say 1 hour)
by using groovy build step + some jenkins java classes, it is easy to monitor, and you can then use post-build email step to alert.
Reply all
Reply to author
Forward
0 new messages