Package jenkins.plugins.purgejobhistory
Class PurgeJobHistory
java.lang.Object
hudson.cli.CLICommand
jenkins.plugins.purgejobhistory.PurgeJobHistory
- All Implemented Interfaces:
ExtensionPoint
,Cloneable
- Author:
- Stephen Connolly
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Force delete even builds marked to be kept forever.The source item.boolean
Force delete even builds marked to be kept forever.boolean
Follows the progress of the operationFields inherited from class hudson.cli.CLICommand
ALLOW_AT_SYNTAX, channel, locale, stderr, stdin, stdout
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPermission
(AbstractItem item) void
purge
(boolean reset, boolean force, boolean recurse) void
purge
(AbstractItem item, boolean reset, boolean force, boolean recurse) static void
Deprecated.static void
Deprecated.protected int
run()
Methods inherited from class hudson.cli.CLICommand
all, checkChannel, clone, createClone, getClientCharset, getClientEnvironmentVariable, getClientSystemProperty, getCmdLineParser, getCurrent, getLongDescription, getName, getSingleLineSummary, getTransportAuthentication, getTransportAuthentication2, getUsage, main, printUsage, printUsageSummary, registerOptionHandlers, setClientCharset, setTransportAuth, setTransportAuth2
-
Field Details
-
reset
public boolean resetFollows the progress of the operation -
force
public boolean forceForce delete even builds marked to be kept forever.- Since:
- 1.1
-
recurse
public boolean recurseForce delete even builds marked to be kept forever.- Since:
- 1.1
-
item
The source item.
-
-
Constructor Details
-
PurgeJobHistory
public PurgeJobHistory()
-
-
Method Details
-
getShortDescription
- Specified by:
getShortDescription
in classCLICommand
-
run
- Specified by:
run
in classCLICommand
- Throws:
Exception
-
purge
Deprecated.Purges the build history of the specified job.- Parameters:
job
- the job to purgeresetNextBuildNumber
-true
if the next build number should be reset to1
after the purge- Throws:
IOException
- if something went wrong.
-
purge
@Deprecated public static void purge(Job<?, ?> job, boolean resetNextBuildNumber, boolean force) throws IOExceptionDeprecated.Purges the build history of the specified job.- Parameters:
job
- the job to purgeresetNextBuildNumber
-true
if the next build number should be reset to1
after the purgeforce
-true
to delete even builds marked to be kept forever- Throws:
IOException
- if something went wrong.- Since:
- 1.1
-
purge
- Throws:
IOException
-
purge
public void purge(AbstractItem item, boolean reset, boolean force, boolean recurse) throws IOException - Throws:
IOException
-
checkPermission
-
purge(Job, boolean, boolean)