Class PipelineNodeUtil
java.lang.Object
io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeUtil
- Author:
- Vivek Pandey
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Predicate<org.jenkinsci.plugins.workflow.graph.FlowNode>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getCauseOfBlockage
(org.jenkinsci.plugins.workflow.graph.FlowNode stage, org.jenkinsci.plugins.workflow.graph.FlowNode nodeBlock) Gives cause of block for declarative style plugin where agent (node block) is declared inside a stage.static String
getDisplayName
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static io.jenkins.blueocean.rest.model.BlueRun.BlueRunResult
static io.jenkins.blueocean.rest.model.BlueRun.BlueRunResult
getStatus
(org.jenkinsci.plugins.workflow.actions.ErrorAction errorAction) static org.jenkinsci.plugins.workflow.actions.TagsAction
getSyntheticStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isAgentStart
(org.jenkinsci.plugins.workflow.graph.FlowNode node) Determine if the givenFlowNode
is the initialStepStartNode
for anExecutorStep
.static boolean
isParallelBranch
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isPausedForInputStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode step, org.jenkinsci.plugins.workflow.support.steps.input.InputAction inputAction) static boolean
isPostSyntheticStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isPreSyntheticStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isSkippedStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node) static boolean
isSyntheticStage
(org.jenkinsci.plugins.workflow.graph.FlowNode node)
-
Field Details
-
isLoggable
-
-
Constructor Details
-
PipelineNodeUtil
public PipelineNodeUtil()
-
-
Method Details
-
getStatus
@NonNull public static io.jenkins.blueocean.rest.model.BlueRun.BlueRunResult getStatus(@Nullable org.jenkinsci.plugins.workflow.actions.ErrorAction errorAction) -
getStatus
@NonNull public static io.jenkins.blueocean.rest.model.BlueRun.BlueRunResult getStatus(@NonNull Throwable error) -
getDisplayName
@NonNull public static String getDisplayName(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isStage
public static boolean isStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isSyntheticStage
public static boolean isSyntheticStage(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
getSyntheticStage
@CheckForNull public static org.jenkinsci.plugins.workflow.actions.TagsAction getSyntheticStage(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isPostSyntheticStage
public static boolean isPostSyntheticStage(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isSkippedStage
public static boolean isSkippedStage(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isPreSyntheticStage
public static boolean isPreSyntheticStage(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isParallelBranch
public static boolean isParallelBranch(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
getCauseOfBlockage
@CheckForNull public static String getCauseOfBlockage(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode stage, @Nullable org.jenkinsci.plugins.workflow.graph.FlowNode nodeBlock) Gives cause of block for declarative style plugin where agent (node block) is declared inside a stage.pipeline { agent none stages { stage ('first') { agent { label 'first' } steps{ sh 'echo "from first"' } } } }
- Parameters:
stage
- stage'sFlowNode
nodeBlock
- agent or node block'sFlowNode
- Returns:
- cause of block if present, nul otherwise
-
isPausedForInputStep
public static boolean isPausedForInputStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode step, @Nullable org.jenkinsci.plugins.workflow.support.steps.input.InputAction inputAction) -
isAgentStart
public static boolean isAgentStart(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) Determine if the givenFlowNode
is the initialStepStartNode
for anExecutorStep
.- Parameters:
node
- a possibly nullFlowNode
- Returns:
- true if
node
is the non-body start of the agent execution.
-