Class PurgeJobHistory

java.lang.Object
hudson.cli.CLICommand
jenkins.plugins.purgejobhistory.PurgeJobHistory
All Implemented Interfaces:
ExtensionPoint, Cloneable

@Extension public class PurgeJobHistory extends CLICommand
Author:
Stephen Connolly
  • Field Details

    • reset

      public boolean reset
      Follows the progress of the operation
    • force

      public boolean force
      Force delete even builds marked to be kept forever.
      Since:
      1.1
    • recurse

      public boolean recurse
      Force delete even builds marked to be kept forever.
      Since:
      1.1
    • item

      public AbstractItem item
      The source item.
  • Constructor Details

    • PurgeJobHistory

      public PurgeJobHistory()
  • Method Details

    • getShortDescription

      public String getShortDescription()
      Specified by:
      getShortDescription in class CLICommand
    • run

      protected int run() throws Exception
      Specified by:
      run in class CLICommand
      Throws:
      Exception
    • purge

      @Deprecated public static void purge(Job<?,?> job, boolean resetNextBuildNumber) throws IOException
      Purges the build history of the specified job.
      Parameters:
      job - the job to purge
      resetNextBuildNumber - true if the next build number should be reset to 1 after the purge
      Throws:
      IOException - if something went wrong.
    • purge

      @Deprecated public static void purge(Job<?,?> job, boolean resetNextBuildNumber, boolean force) throws IOException
      Deprecated.
      Purges the build history of the specified job.
      Parameters:
      job - the job to purge
      resetNextBuildNumber - true if the next build number should be reset to 1 after the purge
      force - true to delete even builds marked to be kept forever
      Throws:
      IOException - if something went wrong.
      Since:
      1.1
    • purge

      public void purge(boolean reset, boolean force, boolean recurse) throws IOException
      Throws:
      IOException
    • purge

      public void purge(AbstractItem item, boolean reset, boolean force, boolean recurse) throws IOException
      Throws:
      IOException
    • checkPermission

      public boolean checkPermission(AbstractItem item)