Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-23446] Added aggregation action for matrix projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Sep 24, 2014
1 parent 4f2bbc2 commit ab2228e
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -13,6 +13,7 @@

import hudson.model.BuildListener;

import hudson.plugins.analysis.core.BuildHistory;
import hudson.plugins.analysis.core.HealthDescriptor;
import hudson.plugins.analysis.core.ParserResult;

Expand Down Expand Up @@ -69,10 +70,21 @@ public boolean endRun(final MatrixRun run) throws InterruptedException, IOExcept
aggregation.addAnnotations(result.getAnnotations());
aggregation.addModules(result.getModules());
}
createTotalsAction();
}
return true;
}

private void createTotalsAction() {
ParserResult totals = new ParserResult();
for (ParserResult result : totalsPerParser.values()) {
totals.addProject(result);
}
BuildHistory history = new BuildHistory(build, AggregatedWarningsResultAction.class, useStableBuildAsReference);
AggregatedWarningsResult result = new AggregatedWarningsResult(build, history, totals, defaultEncoding);
build.getActions().add(new AggregatedWarningsResultAction(build, result));
}

@Override
public boolean endBuild() throws InterruptedException, IOException {
for (String parser : totalsPerParser.keySet()) {
Expand Down

0 comments on commit ab2228e

Please sign in to comment.