Class DiscardBuildPublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
org.jenkinsci.plugins.discardbuild.DiscardBuildPublisher
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
Plugin that discards old build histories with greater user configurability than the core function.
Enables discarding builds by status, keeping older builds for every N builds / N days,
or discarding builds which have too small or too large logfile size (along with a combination of some of these).
- Author:
- tamagawahiroko, benjaminbeggs
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
ConstructorsConstructorDescriptionDiscardBuildPublisher
(String daysToKeep, String intervalDaysToKeep, String numToKeep, String intervalNumToKeep, boolean discardSuccess, boolean discardUnstable, boolean discardFailure, boolean discardNotBuilt, boolean discardAborted, String minLogFileSize, String maxLogFileSize, String regexp, boolean keepLastBuilds, boolean holdMaxBuilds) -
Method Summary
Modifier and TypeMethodDescriptionprotected Calendar
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
perform
(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
-
Constructor Details
-
DiscardBuildPublisher
@DataBoundConstructor public DiscardBuildPublisher(String daysToKeep, String intervalDaysToKeep, String numToKeep, String intervalNumToKeep, boolean discardSuccess, boolean discardUnstable, boolean discardFailure, boolean discardNotBuilt, boolean discardAborted, String minLogFileSize, String maxLogFileSize, String regexp, boolean keepLastBuilds, boolean holdMaxBuilds)
-
-
Method Details
-
perform
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
-
getDaysToKeep
-
getNumToKeep
-
getMinLogFileSize
-
getMaxLogFileSize
-
getIntervalDaysToKeep
-
getRegexp
-
getIntervalNumToKeep
-
isDiscardSuccess
public boolean isDiscardSuccess() -
isDiscardUnstable
public boolean isDiscardUnstable() -
isDiscardFailure
public boolean isDiscardFailure() -
isDiscardNotBuilt
public boolean isDiscardNotBuilt() -
isDiscardAborted
public boolean isDiscardAborted() -
isKeepLastBuilds
public boolean isKeepLastBuilds() -
isHoldMaxBuilds
public boolean isHoldMaxBuilds() -
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classRecorder
-
getRequiredMonitorService
-
getCurrentCalendar
-