Class DefaultGlobalBuildDiscarderStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GlobalBuildDiscarderStrategy>
-
- jenkins.model.GlobalBuildDiscarderStrategy
-
- io.jenkins.plugins.builddiscarders.DefaultGlobalBuildDiscarderStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalBuildDiscarderStrategy>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class DefaultGlobalBuildDiscarderStrategy extends GlobalBuildDiscarderStrategy
Apply a user-specified build discarder periodically on all jobs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultGlobalBuildDiscarderStrategy.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DefaultGlobalBuildDiscarderStrategy(BuildDiscarder discarder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Job<?,?> job)
BuildDiscarder
getDiscarder()
boolean
isApplicable(Job<?,?> job)
Checks if the discarder should be applied to the job-
Methods inherited from class jenkins.model.GlobalBuildDiscarderStrategy
apply
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
DefaultGlobalBuildDiscarderStrategy
@DataBoundConstructor public DefaultGlobalBuildDiscarderStrategy(BuildDiscarder discarder)
-
-
Method Detail
-
getDiscarder
public BuildDiscarder getDiscarder()
-
isApplicable
public boolean isApplicable(Job<?,?> job)
Checks if the discarder should be applied to the job- Specified by:
isApplicable
in classGlobalBuildDiscarderStrategy
- Parameters:
job
- targeted for discard- Returns:
- applicable for jobs without a specified build discarder
-
apply
public void apply(Job<?,?> job) throws IOException, InterruptedException
- Overrides:
apply
in classGlobalBuildDiscarderStrategy
- Throws:
IOException
InterruptedException
-
-