Class FreeDeadJobs

java.lang.Object
org.jenkins.plugins.lockableresources.FreeDeadJobs

public final class FreeDeadJobs extends Object
Sometimes after re-starts (jenkins crashed or what ever) are resources still locked by build, but the build is no more running. This script will 'unlock' all resource assigned to dead builds
  • Method Details

    • freePostMortemResources

      @Initializer(after=JOB_LOADED) public static void freePostMortemResources()
    • resumeDelayedReleases

      @Initializer(after=JOB_CONFIG_ADAPTED) public static void resumeDelayedReleases()
      Release delays (lock step onReleaseDelay / onCancelDelay) are persisted on the resources. After a restart, release the ones that ended while Jenkins was down and schedule the pending ones again. Runs after all jobs are loaded (the last milestone before COMPLETED; an initializer must not run after COMPLETED, see JENKINS-37759), so the waiting pipelines that get the resources can resume.