Class ExitLifecycle

java.lang.Object
hudson.lifecycle.Lifecycle
hudson.lifecycle.ExitLifecycle
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
Lifecycle.PlaceholderLifecycle, SystemdLifecycle

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public class ExitLifecycle extends Lifecycle
Lifecycle that delegates the responsibility to restart Jenkins to an external watchdog such as SystemD or OpenRC.

Restart by exit with specific code.

Author:
Alon Bar-Lev
  • Constructor Details

    • ExitLifecycle

      public ExitLifecycle()
  • Method Details

    • restart

      public void restart()
      Description copied from class: Lifecycle
      If this life cycle supports a restart of Hudson, do so. Otherwise, throw UnsupportedOperationException, which is what the default implementation does.

      The restart operation may happen synchronously (in which case this method will never return), or asynchronously (in which case this method will successfully return.)

      Throw an exception if the operation fails unexpectedly.

      Overrides:
      restart in class Lifecycle
    • onBootFailure

      public void onBootFailure(BootFailure problem)
      Description copied from class: Lifecycle
      Called when Jenkins has failed to boot.
      Overrides:
      onBootFailure in class Lifecycle
      Parameters:
      problem - a boot failure (could be JenkinsReloadFailed)