|
||||||||||
| 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.tasks.Recorder
hudson.plugins.analysis.core.HealthAwareRecorder
public abstract class HealthAwareRecorder
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 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 |
| Field Summary |
|---|
| Fields inherited from interface hudson.tasks.BuildStep |
|---|
BUILDERS, PUBLISHERS |
| Constructor Summary | |
|---|---|
HealthAwareRecorder(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 HealthAwareRecorder. |
|
HealthAwareRecorder(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 | |
|---|---|
boolean |
canComputeNew()
Returns whether new warnings should be computed (with respect to baseline). |
protected boolean |
canContinue(hudson.model.Result result)
Returns whether this publisher can continue processing. |
boolean |
canResolveRelativePaths()
Returns whether relative paths in warnings should be resolved using a time expensive operation that scans the whole workspace for matching files. |
protected void |
copyFilesWithAnnotationsToBuildFolder(File rootDir,
hudson.remoting.VirtualChannel channel,
Collection<FileAnnotation> annotations)
Copies all files with annotations from the workspace to the build folder. |
boolean |
getCanComputeNew()
Returns whether new warnings should be computed (with respect to baseline). |
boolean |
getCanResolveRelativePaths()
Returns whether relative paths in warnings should be resolved using a time expensive operation that scans the whole workspace for matching files. |
boolean |
getCanRunOnFailed()
Returns whether this plug-in can run for failed builds, too. |
String |
getDefaultEncoding()
Returns the defined default encoding. |
PluginDescriptor |
getDescriptor()
|
String |
getHealthy()
Returns the healthy threshold, i.e. |
Priority |
getMinimumPriority()
Returns the minimum priority that should be considered when computing build health. |
hudson.tasks.BuildStepMonitor |
getRequiredMonitorService()
|
boolean |
getShouldDetectModules()
Returns whether module names should be derived from Maven POM or Ant build files. |
String |
getThresholdLimit()
Returns the threshold limit. |
Thresholds |
getThresholds()
Returns the threshold of all annotations to be reached if a build should be considered as unstable or failed, resp. |
String |
getUnHealthy()
Returns the unhealthy threshold, i.e. |
boolean |
getUseDeltaValues()
Returns whether absolute annotations delta or the actual annotations set difference should be used to evaluate the build stability. |
protected boolean |
isAntBuild(hudson.model.AbstractBuild<?,?> build)
Returns whether the current build uses ant. |
protected boolean |
isMavenBuild(hudson.model.AbstractBuild<?,?> build)
Returns whether the current build uses maven. |
protected boolean |
isThresholdEnabled()
Returns whether there is a health threshold enabled. |
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
|
protected abstract 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 Object |
readResolve()
Initializes new fields that are not serialized yet. |
boolean |
shouldDetectModules()
Returns whether module names should be derived from Maven POM or Ant build files. |
| 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 |
| Constructor Detail |
|---|
public HealthAwareRecorder(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)
HealthAwareRecorder.
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
@Deprecated
public HealthAwareRecorder(String threshold,
String newThreshold,
String failureThreshold,
String newFailureThreshold,
String healthy,
String unHealthy,
String thresholdLimit,
String defaultEncoding,
boolean useDeltaValues,
boolean canRunOnFailed,
String pluginName)
| Method Detail |
|---|
public boolean getCanResolveRelativePaths()
true if relative paths can be resolved,
false otherwisepublic boolean canResolveRelativePaths()
true if relative paths can be resolved,
false otherwiseprotected Object readResolve()
public final boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws InterruptedException,
IOException
perform in interface hudson.tasks.BuildStepperform in class hudson.tasks.BuildStepCompatibilityLayerInterruptedException
IOException
protected abstract boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
PluginLogger logger)
throws InterruptedException,
IOException
build - current buildlauncher - the launcher for this buildlogger - the logger
true if the build can continue, false
otherwise
IOException - in case of problems during file copying
InterruptedException - if the user canceled the buildpublic PluginDescriptor getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>getDescriptor in class hudson.tasks.Recorder
protected void copyFilesWithAnnotationsToBuildFolder(File rootDir,
hudson.remoting.VirtualChannel channel,
Collection<FileAnnotation> annotations)
throws IOException,
FileNotFoundException,
InterruptedException
rootDir - directory to store the copied files inchannel - channel to get the files fromannotations - annotations determining the actual files to copy
IOException - if the files could not be written
FileNotFoundException - if the files could not be written
InterruptedException - if the user cancels the processingpublic boolean getCanComputeNew()
true if new warnings should be computed (with
respect to baseline), false otherwisepublic boolean canComputeNew()
true if new warnings should be computed (with
respect to baseline), false otherwisepublic boolean getCanRunOnFailed()
true if this plug-in can run for failed builds,
false otherwisepublic boolean getShouldDetectModules()
public boolean shouldDetectModules()
protected boolean canContinue(hudson.model.Result result)
true if the property
canRunOnFailed is set or if the build is not aborted or
failed.
result - build result
true if the build can continuepublic Thresholds getThresholds()
getThresholds in interface HealthDescriptorpublic boolean getUseDeltaValues()
true if the annotation count should be used,
false if the actual (set) difference should be
computedpublic String getHealthy()
getHealthy in interface HealthDescriptorpublic String getUnHealthy()
getUnHealthy in interface HealthDescriptorpublic 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 String getThresholdLimit()
public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
getRequiredMonitorService in interface hudson.tasks.BuildStepprotected boolean isThresholdEnabled()
true if at least one threshold is enabled,
false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||