Skip to content

jenkinsci/periodic-reincarnation-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restart and execute an action over builds with infrastructure failures. There are various ways to restart a failed job and this plugin implements some of the mechanisms to do so.

OFFICIAL WIKI PAGE: https://wiki.jenkins-ci.org/display/JENKINS/Periodic+Reincarnation+Plugin For suggestions and problems please report under "Open Issues".

This plugin will let you define a set of regular expressions each one with master/node groovy script and its own cron time tab. Every minute the plugin checks via a jenkins periodic job if the current time is covered by some ot the configured cron tabs. If so it searches for jobs that correspond to at least one regular expression and restarts them.

There is also the additional option to restart jobs if the last build has failed but the second last was a success and there were no SCM or config changes between these two builds.

This plugin can be useful when something temporary may be causing a build to fail. For instance:

  • there was not enough space on the hard disk. Upon that event a disk clean can be automatically performed.

  • there was a communication problem with a slave. A script to disconnect such agent is provided.

  • there was some incompatibility of some kind

Another example: It is easy to periodically restart all jobs that have failed because of some arbitrary "error_failing_the_build". Just activate the plugin, set the cron time ("* * * * *" for every minute), and add this "error_failing_the_build" as regular expression.

The configuration for this plugin can be found in the global configuration page of Jenkins under "Periodic Reincarnation of failed builds".

Example of Groovy scripts can be found here: https://github.com/jenkinsci/periodic-reincarnation-plugin/tree/master/scripts