hudson.plugins.analysis.core
Class HealthAwarePublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
hudson.plugins.analysis.core.HealthAwareRecorder
hudson.plugins.analysis.core.HealthAwarePublisher
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.matrix.MatrixAggregatable, hudson.model.Describable<hudson.tasks.Publisher>, HealthDescriptor, hudson.tasks.BuildStep, Serializable
public abstract class HealthAwarePublisher
- extends HealthAwareRecorder
A base class for publishers with the following two characteristics:
- It provides a unstable threshold, that could be enabled and set in the
configuration screen. If the number of annotations in a build exceeds this
value then the build is considered as
UNSTABLE.
- It provides thresholds for the build health, that could be adjusted in
the configuration screen. These values are used by the
HealthReportBuilder to compute the health and the health trend graph.
- Author:
- Ulli Hafner
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class hudson.tasks.Publisher |
hudson.tasks.Publisher.DescriptorExtensionListImpl |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Nested classes/interfaces inherited from interface hudson.tasks.BuildStep |
hudson.tasks.BuildStep.PublisherList |
| Fields inherited from interface hudson.tasks.BuildStep |
BUILDERS, PUBLISHERS |
|
Constructor Summary |
HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
boolean canComputeNew,
boolean canResolveRelativePaths,
String pluginName)
Creates a new instance of HealthAwarePublisher. |
HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
boolean canComputeNew,
String pluginName)
Creates a new instance of HealthAwarePublisher. |
HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
String pluginName)
Deprecated. |
HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
String pluginName)
Deprecated. |
HealthAwarePublisher(String threshold,
String newThreshold,
String failureThreshold,
String newFailureThreshold,
String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
boolean canRunOnFailed,
String pluginName)
Deprecated. |
|
Method Summary |
protected boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
PluginLogger logger)
Callback method that is invoked after the build where this recorder can
collect the results. |
protected abstract BuildResult |
perform(hudson.model.AbstractBuild<?,?> build,
PluginLogger logger)
Performs the publishing of the results of this plug-in. |
protected void |
updateBuildResult(BuildResult result,
PluginLogger logger)
Will be invoked after the build result has been evaluated. |
| Methods inherited from class hudson.plugins.analysis.core.HealthAwareRecorder |
canComputeNew, canContinue, canResolveRelativePaths, copyFilesWithAnnotationsToBuildFolder, getCanComputeNew, getCanResolveRelativePaths, getCanRunOnFailed, getDefaultEncoding, getDescriptor, getHealthy, getMinimumPriority, getRequiredMonitorService, getShouldDetectModules, getThresholdLimit, getThresholds, getUnHealthy, getUseDeltaValues, isAntBuild, isMavenBuild, isThresholdEnabled, perform, readResolve, shouldDetectModules |
| Methods inherited from class hudson.tasks.Publisher |
all, getProjectAction, needsToRun, needsToRunAfterFinalized, prebuild |
| Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer |
getProjectAction, getProjectActions, 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.matrix.MatrixAggregatable |
createAggregator |
| Methods inherited from interface hudson.tasks.BuildStep |
getProjectAction, getProjectActions, prebuild |
HealthAwarePublisher
public HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
boolean canComputeNew,
boolean canResolveRelativePaths,
String pluginName)
- Creates a new instance of
HealthAwarePublisher.
- Parameters:
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 valuethresholdLimit - determines which warning priorities should be considered when
evaluating the build stability and healthdefaultEncoding - the default encoding to be used when reading and parsing filesuseDeltaValues - determines whether the absolute annotations delta or the
actual annotations set difference should be used to evaluate
the build stabilityunstableTotalAll - annotation thresholdunstableTotalHigh - annotation thresholdunstableTotalNormal - annotation thresholdunstableTotalLow - annotation thresholdunstableNewAll - annotation thresholdunstableNewHigh - annotation thresholdunstableNewNormal - annotation thresholdunstableNewLow - annotation thresholdfailedTotalAll - annotation thresholdfailedTotalHigh - annotation thresholdfailedTotalNormal - annotation thresholdfailedTotalLow - annotation thresholdfailedNewAll - annotation thresholdfailedNewHigh - annotation thresholdfailedNewNormal - annotation thresholdfailedNewLow - annotation thresholdcanRunOnFailed - determines whether the plug-in can run for failed builds, tooshouldDetectModules - determines whether module names should be derived from Maven
POM or Ant build filescanComputeNew - determines whether new warnings should be computed (with
respect to baseline)canResolveRelativePaths - determines whether relative paths in warnings should be
resolved using a time expensive operation that scans the whole
workspace for matching files.pluginName - the name of the plug-in
HealthAwarePublisher
public HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
boolean canComputeNew,
String pluginName)
- Creates a new instance of
HealthAwarePublisher.
- Parameters:
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 valuethresholdLimit - determines which warning priorities should be considered when
evaluating the build stability and healthdefaultEncoding - the default encoding to be used when reading and parsing filesuseDeltaValues - determines whether the absolute annotations delta or the
actual annotations set difference should be used to evaluate
the build stabilityunstableTotalAll - annotation thresholdunstableTotalHigh - annotation thresholdunstableTotalNormal - annotation thresholdunstableTotalLow - annotation thresholdunstableNewAll - annotation thresholdunstableNewHigh - annotation thresholdunstableNewNormal - annotation thresholdunstableNewLow - annotation thresholdfailedTotalAll - annotation thresholdfailedTotalHigh - annotation thresholdfailedTotalNormal - annotation thresholdfailedTotalLow - annotation thresholdfailedNewAll - annotation thresholdfailedNewHigh - annotation thresholdfailedNewNormal - annotation thresholdfailedNewLow - annotation thresholdcanRunOnFailed - determines whether the plug-in can run for failed builds, tooshouldDetectModules - determines whether module names should be derived from Maven
POM or Ant build filescanComputeNew - determines whether new warnings should be computed (with
respect to baseline)pluginName - the name of the plug-in
HealthAwarePublisher
@Deprecated
public HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
boolean shouldDetectModules,
String pluginName)
- Deprecated.
HealthAwarePublisher
@Deprecated
public HealthAwarePublisher(String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
String unstableTotalAll,
String unstableTotalHigh,
String unstableTotalNormal,
String unstableTotalLow,
String unstableNewAll,
String unstableNewHigh,
String unstableNewNormal,
String unstableNewLow,
String failedTotalAll,
String failedTotalHigh,
String failedTotalNormal,
String failedTotalLow,
String failedNewAll,
String failedNewHigh,
String failedNewNormal,
String failedNewLow,
boolean canRunOnFailed,
String pluginName)
- Deprecated.
HealthAwarePublisher
@Deprecated
public HealthAwarePublisher(String threshold,
String newThreshold,
String failureThreshold,
String newFailureThreshold,
String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
boolean canRunOnFailed,
String pluginName)
- Deprecated.
perform
protected boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
PluginLogger logger)
throws IOException,
InterruptedException
- Callback method that is invoked after the build where this recorder can
collect the results. This default implementation provides a template
method that updates the build status based on the results and copies all
files with warnings to the build folder on the master.
- Specified by:
perform in class HealthAwareRecorder
- Parameters:
build - current buildlauncher - the launcher for this buildlogger - the logger
- Returns:
true if the build can continue, false
otherwise
- Throws:
IOException - in case of problems during file copying
InterruptedException - if the user canceled the build
updateBuildResult
protected void updateBuildResult(BuildResult result,
PluginLogger logger)
- Will be invoked after the build result has been evaluated.
- Parameters:
result - the evaluated build resultlogger - the logger
perform
protected abstract BuildResult perform(hudson.model.AbstractBuild<?,?> build,
PluginLogger logger)
throws InterruptedException,
IOException
- Performs the publishing of the results of this plug-in.
- Parameters:
build - the buildlogger - the logger to report the progress to
- Returns:
- the java project containing the found annotations
- Throws:
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.
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.
Copyright © 2004-2012 Hudson. All Rights Reserved.