Package jenkins.model

Class GlobalBuildDiscarderListener

java.lang.Object
hudson.model.listeners.RunListener<Run>
jenkins.model.GlobalBuildDiscarderListener
All Implemented Interfaces:
ExtensionPoint

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class GlobalBuildDiscarderListener extends RunListener<Run>
Run build discarders on an individual job once a build is finalized
  • Constructor Details

    • GlobalBuildDiscarderListener

      public GlobalBuildDiscarderListener()
  • Method Details

    • onFinalized

      public void onFinalized(Run run)
      Description copied from class: RunListener
      Called after a build is moved to the Run.State.COMPLETED state.

      At this point, all the records related to a build is written down to the disk. As such, TaskListener is no longer available. This happens later than RunListener.onCompleted(Run, TaskListener).

      Overrides:
      onFinalized in class RunListener<Run>
    • await

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public static void await() throws Exception
      Waits for all currently scheduled or running discards to complete.
      Throws:
      Exception