public class EnhancedOldBuildDiscarder
extends jenkins.model.BuildDiscarder
Modifier and Type | Class and Description |
---|---|
static class |
EnhancedOldBuildDiscarder.EnhancedOldBuildDiscarderDescriptor |
Modifier and Type | Field and Description |
---|---|
Integer |
artifactDaysToKeep
If not -1 nor null, artifacts are only kept up to this days.
|
Integer |
artifactNumToKeep
If not -1 nor null, only this number of builds have their artifacts kept.
|
int |
daysToKeep
If not -1, history is only kept up to this days.
|
boolean |
holdMaxBuilds |
int |
numToKeep
If not -1, only this number of build logs are kept.
|
Constructor and Description |
---|
EnhancedOldBuildDiscarder(int daysToKeep,
int numToKeep,
int artifactDaysToKeep,
int artifactNumToKeep,
boolean discardOnlyWhenLastBuildIsSuccess,
boolean discardHoldMaxBuilds) |
EnhancedOldBuildDiscarder(String daysToKeepStr,
String numToKeepStr,
String artifactDaysToKeepStr,
String artifactNumToKeepStr,
boolean discardOnlyOnSuccess,
boolean holdMaxBuilds) |
Modifier and Type | Method and Description |
---|---|
int |
getArtifactDaysToKeep() |
String |
getArtifactDaysToKeepStr() |
int |
getArtifactNumToKeep() |
String |
getArtifactNumToKeepStr() |
Calendar |
getCalDaysToKeep(int daysToKeep) |
int |
getDaysToKeep() |
String |
getDaysToKeepStr() |
int |
getNumToKeep() |
String |
getNumToKeepStr() |
boolean |
isDiscardOnlyOnSuccess() |
boolean |
isHoldMaxBuilds() |
static int |
parse(String p) |
void |
perform(hudson.model.Job<?,?> job) |
void |
setDiscardOnlyOnSuccess(boolean discardOnlyOnSuccess) |
void |
setHoldMaxBuilds(boolean holdMaxBuilds) |
String |
toString(Integer i) |
int |
unbox(Integer i) |
public int daysToKeep
public int numToKeep
public Integer artifactDaysToKeep
public Integer artifactNumToKeep
public boolean holdMaxBuilds
@DataBoundConstructor public EnhancedOldBuildDiscarder(String daysToKeepStr, String numToKeepStr, String artifactDaysToKeepStr, String artifactNumToKeepStr, boolean discardOnlyOnSuccess, boolean holdMaxBuilds)
public EnhancedOldBuildDiscarder(int daysToKeep, int numToKeep, int artifactDaysToKeep, int artifactNumToKeep, boolean discardOnlyWhenLastBuildIsSuccess, boolean discardHoldMaxBuilds)
public void perform(hudson.model.Job<?,?> job) throws IOException, InterruptedException
IOException
InterruptedException
public int getDaysToKeep()
public int getNumToKeep()
public int getArtifactDaysToKeep()
public int getArtifactNumToKeep()
public String getDaysToKeepStr()
public String getNumToKeepStr()
public String getArtifactDaysToKeepStr()
public String getArtifactNumToKeepStr()
public boolean isDiscardOnlyOnSuccess()
public boolean isHoldMaxBuilds()
public void setDiscardOnlyOnSuccess(boolean discardOnlyOnSuccess)
public void setHoldMaxBuilds(boolean holdMaxBuilds)
public static int parse(String p)
public Calendar getCalDaysToKeep(int daysToKeep)
public int unbox(Integer i)
Copyright © 2004-2019. All Rights Reserved.