|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.plugins.findbugs.util.HealthAwarePublisher
public abstract class HealthAwarePublisher
A base class for publishers with the following two characteristics:
UNSTABLE.
HealthReportBuilder to compute the health and the health trend graph.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.tasks.BuildStep |
|---|
hudson.tasks.BuildStep.PublisherList |
| Field Summary |
|---|
| Fields inherited from interface hudson.tasks.BuildStep |
|---|
BUILDERS, PUBLISHERS |
| Constructor Summary | |
|---|---|
HealthAwarePublisher(java.lang.String threshold,
java.lang.String newThreshold,
java.lang.String failureThreshold,
java.lang.String newFailureThreshold,
java.lang.String healthy,
java.lang.String unHealthy,
java.lang.String height,
java.lang.String thresholdLimit,
java.lang.String defaultEncoding,
java.lang.String pluginName)
Creates a new instance of HealthAwarePublisher. |
|
| Method Summary | |
|---|---|
protected boolean |
canContinue(hudson.model.Result result)
Returns whether the publisher can continue processing. |
java.lang.String |
getDefaultEncoding()
Returns the defined default encoding. |
java.lang.String |
getFailureThreshold()
Returns the annotation threshold to be reached if a build should be considered as failure. |
java.lang.String |
getHealthy()
Returns the healthy threshold, i.e. when health is reported as 100%. |
int |
getHealthyAnnotations()
Returns the healthy threshold for annotations, i.e. when health is reported as 100%. |
java.lang.String |
getHeight()
Returns the height of the trend graph. |
int |
getMinimumAnnotations()
Returns the threshold to be reached if a build should be considered as unstable. |
Priority |
getMinimumPriority()
Returns the minimum priority that should be considered when computing build health and stability. |
java.lang.String |
getNewFailureThreshold()
Returns the threshold of new annotations to be reached if a build should be considered as failure. |
java.lang.String |
getNewThreshold()
Returns the threshold of new annotations to be reached if a build should be considered as unstable. |
java.lang.String |
getThreshold()
Returns the annotation threshold to be reached if a build should be considered as unstable. |
java.lang.String |
getThresholdLimit()
Returns the threshold limit. |
int |
getTrendHeight()
Returns the height of the trend graph. |
java.lang.String |
getUnHealthy()
Returns the unhealthy threshold, i.e. when health is reported as 0%. |
int |
getUnHealthyAnnotations()
Returns the unhealthy threshold of annotations, i.e. when health is reported as 0%. |
protected boolean |
isAntBuild(hudson.model.AbstractBuild<?,?> build)
Returns whether the current build uses ant. |
boolean |
isHealthyReportEnabled()
Determines whether a health report should be created. |
protected boolean |
isMavenBuild(hudson.model.AbstractBuild<?,?> build)
Returns whether the current build uses maven. |
boolean |
isThresholdEnabled()
Determines whether a threshold has been defined. |
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
|
protected abstract BuildResult |
perform(hudson.model.AbstractBuild<?,?> build,
PluginLogger logger)
Performs the publishing of the results of this plug-in. |
protected java.lang.Object |
readResolve()
Initializes new fields that are not serialized yet. |
| Methods inherited from class hudson.tasks.Publisher |
|---|
getProjectAction, needsToRunAfterFinalized, prebuild |
| Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer |
|---|
getProjectAction, perform, prebuild |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.tasks.BuildStep |
|---|
getProjectAction, prebuild |
| Methods inherited from interface hudson.model.Describable |
|---|
getDescriptor |
| Constructor Detail |
|---|
public HealthAwarePublisher(java.lang.String threshold,
java.lang.String newThreshold,
java.lang.String failureThreshold,
java.lang.String newFailureThreshold,
java.lang.String healthy,
java.lang.String unHealthy,
java.lang.String height,
java.lang.String thresholdLimit,
java.lang.String defaultEncoding,
java.lang.String pluginName)
HealthAwarePublisher.
threshold - Annotations threshold to be reached if a build should be
considered as unstable.newThreshold - New annotations threshold to be reached if a build should be
considered as unstable.failureThreshold - Annotation threshold to be reached if a build should be considered as
failure.newFailureThreshold - New annotations threshold to be reached if a build should be
considered as failure.healthy - Report health as 100% when the number of open tasks is less
than this valueunHealthy - Report health as 0% when the number of open tasks is greater
than this valueheight - the height of the trend graphthresholdLimit - determines which warning priorities should be considered when
evaluating the build stability and healthpluginName - the name of the plug-indefaultEncoding - the default encoding to be used when reading and parsing files| Method Detail |
|---|
protected java.lang.Object readResolve()
public final boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws java.lang.InterruptedException,
java.io.IOException
perform in interface hudson.tasks.BuildStepperform in class hudson.tasks.BuildStepCompatibilityLayerjava.lang.InterruptedException
java.io.IOExceptionprotected boolean canContinue(hudson.model.Result result)
true if the build is not aborted or failed.
result - build result
true if the build can continue
protected abstract BuildResult perform(hudson.model.AbstractBuild<?,?> build,
PluginLogger logger)
throws java.lang.InterruptedException,
java.io.IOException
build - the buildlogger - the logger to report the progress to
java.lang.InterruptedException - If the build is interrupted by the user (in an attempt to
abort the build.) Normally the BuildStep
implementations may simply forward the exception it got from
its lower-level functions.
java.io.IOException - If the implementation wants to abort the processing when an
IOException happens, it can simply propagate the
exception to the caller. This will cause the build to fail,
with the default error message. Implementations are
encouraged to catch IOException on its own to provide
a better error message, if it can do so, so that users have
better understanding on why it failed.public boolean isThresholdEnabled()
isThresholdEnabled in interface HealthDescriptortrue if a threshold has been definedpublic java.lang.String getThreshold()
public java.lang.String getNewThreshold()
public java.lang.String getFailureThreshold()
public java.lang.String getNewFailureThreshold()
public int getMinimumAnnotations()
getMinimumAnnotations in interface HealthDescriptorpublic boolean isHealthyReportEnabled()
isHealthyReportEnabled in interface HealthDescriptortrue if a health report should be createdpublic java.lang.String getHealthy()
public int getHealthyAnnotations()
getHealthyAnnotations in interface HealthDescriptorpublic java.lang.String getUnHealthy()
public int getUnHealthyAnnotations()
getUnHealthyAnnotations in interface HealthDescriptorpublic java.lang.String getHeight()
public int getTrendHeight()
public java.lang.String getDefaultEncoding()
protected boolean isMavenBuild(hudson.model.AbstractBuild<?,?> build)
build - the current build
true if the current build uses maven,
false otherwiseprotected boolean isAntBuild(hudson.model.AbstractBuild<?,?> build)
build - the current build
true if the current build uses ant,
false otherwisepublic Priority getMinimumPriority()
Priority.NORMAL is
returned, then annotations with priority Priority.LOW are
ignored.
getMinimumPriority in interface HealthDescriptorpublic java.lang.String getThresholdLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||