org.jenkinsci.plugins.workflow.steps.FlowInterruptedException Java Examples
The following examples show how to use
org.jenkinsci.plugins.workflow.steps.FlowInterruptedException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlowNodeWrapper.java From blueocean-plugin with MIT License | 5 votes |
boolean isBlockErrorInterruptedWithAbort() { if (hasBlockError()) { Throwable error = blockErrorAction.getError(); if (error instanceof FlowInterruptedException) { FlowInterruptedException interrupted = (FlowInterruptedException) error; return interrupted.getResult().equals(Result.ABORTED); } } return false; }
Example #2
Source File: NodeRunStatus.java From blueocean-plugin with MIT License | 5 votes |
public NodeRunStatus(@Nonnull FlowNode endNode) { Result result = null; ErrorAction errorAction = endNode.getError(); WarningAction warningAction = endNode.getPersistentAction(WarningAction.class); if (errorAction != null) { if(errorAction.getError() instanceof FlowInterruptedException) { result = ((FlowInterruptedException) errorAction.getError()).getResult(); } if(result == null || result != Result.ABORTED) { this.result = BlueRun.BlueRunResult.FAILURE; } else { this.result = BlueRun.BlueRunResult.ABORTED; } this.state = endNode.isActive() ? BlueRun.BlueRunState.RUNNING : BlueRun.BlueRunState.FINISHED; } else if (warningAction != null) { this.result = new NodeRunStatus(GenericStatus.fromResult(warningAction.getResult())).result; this.state = endNode.isActive() ? BlueRun.BlueRunState.RUNNING : BlueRun.BlueRunState.FINISHED; } else if (QueueItemAction.getNodeState(endNode) == QueueItemAction.QueueState.QUEUED) { this.result = BlueRun.BlueRunResult.UNKNOWN; this.state = BlueRun.BlueRunState.QUEUED; } else if (QueueItemAction.getNodeState(endNode) == QueueItemAction.QueueState.CANCELLED) { this.result = BlueRun.BlueRunResult.ABORTED; this.state = BlueRun.BlueRunState.FINISHED; } else if (endNode.isActive()) { this.result = BlueRun.BlueRunResult.UNKNOWN; this.state = BlueRun.BlueRunState.RUNNING; } else if (NotExecutedNodeAction.isExecuted(endNode)) { this.result = BlueRun.BlueRunResult.SUCCESS; this.state = BlueRun.BlueRunState.FINISHED; } else { this.result = BlueRun.BlueRunResult.NOT_BUILT; this.state = BlueRun.BlueRunState.QUEUED; } }
Example #3
Source File: PipelineNodeUtil.java From blueocean-plugin with MIT License | 5 votes |
@Nonnull public static BlueRun.BlueRunResult getStatus(@Nonnull Throwable error){ if(error instanceof FlowInterruptedException){ return BlueRun.BlueRunResult.ABORTED; }else{ return BlueRun.BlueRunResult.FAILURE; } }