Reputation: 1201
Im quite new in customizing email notifications for Jenkins.
I wanted to send an email if build is failing for X hours (lets say if status is failed 2h after it was triggered. If this is complicated then sending an email after 5th failed build will do the job.
So I installed email-ext plugin into the jenkins, but in the list of proposed triggers there is nothing like this.
Can someone tell me which file should I change / create in order to create a specific trigger?
Thank you
Upvotes: 0
Views: 489
Reputation: 792
You would want to use a script trigger to do this. You would have to look at the schedule date/time of the first failing job and then the scheduled date/time of the current job to determine if the number of hours had passed. If you add a script trigger to the list of triggers in the Advanced section of the configuration, there is a help button that will give you more information about how to use the script trigger.
Upvotes: 0