Package hudson.matrix
Class MatrixAggregator
- java.lang.Object
-
- hudson.matrix.MatrixAggregator
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
TestResultAggregator
public abstract class MatrixAggregator extends Object implements ExtensionPoint
Performs the aggregation ofMatrixRun
results intoMatrixBuild
.MatrixAggregator
is a transitive stateful mutable object. UnlikePublisher
, it is not persisted. Instead, a fresh instance is created for eachMatrixBuild
, and various methods on this class are invoked in the event callback style as the build progresses.The end result of the aggregation should be
contributed as actions
.- Since:
- 1.115
- Author:
- Kohsuke Kawaguchi
- See Also:
MatrixAggregatable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description protected MatrixBuild
build
The build in progress.protected Launcher
launcher
protected BuildListener
listener
The listener to send the output to.
-
Constructor Summary
Constructors Modifier Constructor Description protected
MatrixAggregator(MatrixBuild build, Launcher launcher, BuildListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
endBuild()
Called after all theMatrixRun
s have been completed to indicate that the build is about to finish.boolean
endRun(MatrixRun run)
Called whenever one run is completed.boolean
startBuild()
Called before the build starts.
-
-
-
Field Detail
-
build
protected final MatrixBuild build
The build in progress. Never null.
-
launcher
protected final Launcher launcher
-
listener
protected final BuildListener listener
The listener to send the output to. Never null.
-
-
Constructor Detail
-
MatrixAggregator
protected MatrixAggregator(MatrixBuild build, Launcher launcher, BuildListener listener)
-
-
Method Detail
-
startBuild
public boolean startBuild() throws InterruptedException, IOException
Called before the build starts.- Returns:
- true if the build can continue, false if there was an error and the build needs to be aborted.
- Throws:
InterruptedException
IOException
- See Also:
BuildStep.prebuild(AbstractBuild,BuildListener)
-
endRun
public boolean endRun(MatrixRun run) throws InterruptedException, IOException
Called whenever one run is completed.- Parameters:
run
- The completedMatrixRun
object. Always non-null.- Returns:
- See
startBuild()
for the return value semantics. - Throws:
InterruptedException
IOException
-
endBuild
public boolean endBuild() throws InterruptedException, IOException
Called after all theMatrixRun
s have been completed to indicate that the build is about to finish.- Returns:
- See
startBuild()
for the return value semantics. - Throws:
InterruptedException
IOException
-
-