Package io.jenkins.plugins.util
Class PipelineResultHandler
java.lang.Object
io.jenkins.plugins.util.PipelineResultHandler
- All Implemented Interfaces:
ResultHandler
,StageResultHandler
A
ResultHandler
that sets the overall build result of the Run
and annotates the given Pipeline
stage with a WarningAction
.- Author:
- Devin Nusbaum
-
Constructor Summary
ConstructorDescriptionPipelineResultHandler
(Run<?, ?> run, org.jenkinsci.plugins.workflow.graph.FlowNode flowNode) Creates a new instance ofPipelineResultHandler
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
publishResult
(Result result, String message) Called to notify the build or stage about the new result.void
publishResult
(QualityGateStatus status, String message) Called to notify the build or stage about the result that is derived from a quality gate status.void
Called to set theResult
of a stage.
-
Constructor Details
-
PipelineResultHandler
Creates a new instance ofPipelineResultHandler
.- Parameters:
run
- the run to set the result forflowNode
- the flow node to add a warning to
-
-
Method Details
-
setResult
Description copied from interface:StageResultHandler
Called to set theResult
of a stage.- Specified by:
setResult
in interfaceStageResultHandler
- Parameters:
result
- the result to setmessage
- a message that describes the cause for the result
-
publishResult
Description copied from interface:ResultHandler
Called to notify the build or stage about the new result.- Specified by:
publishResult
in interfaceResultHandler
- Parameters:
result
- the resultmessage
- a message that describes the cause for the result
-
publishResult
Description copied from interface:ResultHandler
Called to notify the build or stage about the result that is derived from a quality gate status.- Specified by:
publishResult
in interfaceResultHandler
- Parameters:
status
- the quality gate statusmessage
- a message that describes the cause for the result
-