Chapter 18. Restart Aborted Builds Plugin

Introduction

When running a large installation with many users and many jobs, the High Availability feature of Jenkins Enterprise helps bring Jenkins back up quickly after a crash, power outage, etc. If any jobs were waiting in the scheduler queue at the time of the crash, they will still be there after a restart. Running builds, however, cannot be resumed where they left off—recreating the context of the build is in general too complex. (Long-running builds may be used when the context is simple.) Furthermore, after a hard crash (as opposed to a graceful shutdown) Jenkins normally may lose even the build record.

The Restart Aborted Builds plugin in Jenkins Enterprise helps manage exceptional halts like this. First of all, it ensures that at least a partial record of every build is saved immediately after it starts and after every configured build step. If the build completes within Jenkins’s control—including build failures, manual aborts, and termination due to scheduled shutdown—nothing special is done. But if Jenkins is halted suddenly, whether due to a crash or freeze of Jenkins itself or a general system crash, the list of all currently running builds is recorded for use when Jenkins is next restarted. At that time, all aborted builds are displayed in an administrative page, where they can be inspected or easily restarted.

The Restart Aborted Builds plugin was introduced in Jenkins Enterprise 13.05 and requires Jenkins 1.509 or later.