Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-13797] Make build result evaluation overridable.
  • Loading branch information
uhafner committed Jun 12, 2012
1 parent e162b0d commit d1f07ac388257823cb4a31a2fb02acc3c3a0271d
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java
@@ -348,8 +348,7 @@ public final boolean perform(final AbstractBuild<?, ?> build, final Launcher lau
}

if (new NullHealthDescriptor(this).isThresholdEnabled()) {
String baseUrl = getDescriptor().getPluginResultUrlName();
result.evaluateStatus(getThresholds(), useDeltaValues, canComputeNew(), logger, baseUrl);
updateBuildResult(result, logger);
}

copyFilesWithAnnotationsToBuildFolder(build.getRootDir(), launcher.getChannel(), result.getAnnotations());
@@ -360,6 +359,19 @@ public final boolean perform(final AbstractBuild<?, ?> build, final Launcher lau
return true;
}

/**
* Will be invoked after the build result has been evaluated.
*
* @param result
* the evaluated build result
* @param logger
* the logger
*/
protected void updateBuildResult(final BuildResult result, final PluginLogger logger) {
String baseUrl = getDescriptor().getPluginResultUrlName();
result.evaluateStatus(getThresholds(), useDeltaValues, canComputeNew(), logger, baseUrl);
}

@Override
public PluginDescriptor getDescriptor() {
return (PluginDescriptor)super.getDescriptor();

0 comments on commit d1f07ac

Please sign in to comment.