Skip to content

Commit

Permalink
Allow MatrixAggregatable to be registered as an (optional) extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Sep 2, 2017
1 parent 7a675c3 commit bdc61b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/matrix/MatrixAggregatable.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package hudson.matrix;

import hudson.Extension;
import hudson.model.JobProperty;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Publisher;
Expand All @@ -33,7 +34,7 @@
/**
* {@link Publisher}, {@link JobProperty}, {@link BuildWrapper} can optionally implement this interface
* to perform result aggregation across {@link MatrixRun}.
*
* <p>You may also register singleton instances of this as {@link Extension}s.
* <p>
* This is useful for example to aggregate all the test results
* in {@link MatrixRun} into a single table/graph.
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/hudson/matrix/MatrixBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package hudson.matrix;

import hudson.AbortException;
import hudson.ExtensionList;
import hudson.Functions;
import hudson.Util;
import hudson.console.ModelHyperlinkNote;
Expand Down Expand Up @@ -354,6 +355,7 @@ protected Result doRun(BuildListener listener) throws Exception {
listUpAggregators(p.getPublishers().values());
listUpAggregators(p.getProperties().values());
listUpAggregators(p.getBuildWrappers().values());
listUpAggregators(ExtensionList.lookup(MatrixAggregatable.class));

// rebuild project configuration
MatrixProject.RunConfiguration config = p.getRunConfiguration(this);
Expand Down

0 comments on commit bdc61b8

Please sign in to comment.