Class PipelineNodeGraphVisitor
java.lang.Object
org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor
- All Implemented Interfaces:
NodeGraphBuilder,org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
public class PipelineNodeGraphVisitor
extends org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
implements NodeGraphBuilder
- Author:
- Vivek Pandey
Run your Jenkins instance with
-DNODE-DUMP-ENABLEDto turn on the logging when diagnosing bugs! You'll also need to have a logging config that enables debug for (at least) this class. Use-Djava.util.logging.config.file=./logging.propertiesto set a custom logging properties file from the command line, or do it from within the admin UI.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jenkins.blueocean.rest.impl.pipeline.NodeGraphBuilder
NodeGraphBuilder.NodeGraphBuilderFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Map<String, FlowNodeWrapper> final ArrayDeque<FlowNodeWrapper> final Map<String, Stack<FlowNodeWrapper>> Fields inherited from class org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
chunk -
Constructor Summary
ConstructorsConstructorDescriptionPipelineNodeGraphVisitor(org.jenkinsci.plugins.workflow.job.WorkflowRun run) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccumulatePipelineActions(org.jenkinsci.plugins.workflow.graph.FlowNode node) Find any Actions on this node, and add them to the pipelineActions collection until we can attach them to a FlowNodeWrapper.voidatomNode(org.jenkinsci.plugins.workflow.graph.FlowNode before, org.jenkinsci.plugins.workflow.graph.FlowNode atomNode, org.jenkinsci.plugins.workflow.graph.FlowNode after, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scan) voidchunkEnd(org.jenkinsci.plugins.workflow.graph.FlowNode endNode, org.jenkinsci.plugins.workflow.graph.FlowNode afterBlock, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) voidchunkStart(org.jenkinsci.plugins.workflow.graph.FlowNode startNode, org.jenkinsci.plugins.workflow.graph.FlowNode beforeBlock, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) Empty the pipelineActions buffer, returning its contents.Gives all pipeline nodes DAG graphList<io.jenkins.blueocean.rest.model.BluePipelineNode> getPipelineNodes(io.jenkins.blueocean.rest.hal.Link parent) Gives DAG graph as list ofBluePipelineNodeio.jenkins.blueocean.rest.model.BluePipelineStepgetPipelineNodeStep(String id, io.jenkins.blueocean.rest.hal.Link parent) Give the step for given idList<io.jenkins.blueocean.rest.model.BluePipelineStep> getPipelineNodeSteps(io.jenkins.blueocean.rest.hal.Link parent) Gives all the steps in this pipelineList<io.jenkins.blueocean.rest.model.BluePipelineStep> getPipelineNodeSteps(String nodeId, io.jenkins.blueocean.rest.hal.Link parent) Gives all the steps inside given nodeIdprotected voidhandleChunkDone(org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk) booleanvoidparallelBranchEnd(org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, org.jenkinsci.plugins.workflow.graph.FlowNode branchEndNode, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) voidparallelBranchStart(org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, org.jenkinsci.plugins.workflow.graph.FlowNode branchStartNode, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) voidparallelEnd(org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, org.jenkinsci.plugins.workflow.graph.FlowNode parallelEndNode, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) voidparallelStart(org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, org.jenkinsci.plugins.workflow.graph.FlowNode branchNode, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) protected voidresetChunk(org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk) List<io.jenkins.blueocean.rest.model.BluePipelineNode> union(List<FlowNodeWrapper> previousNodes, io.jenkins.blueocean.rest.hal.Link parent) Create union of last successful run and this partial run
-
Field Details
-
nodes
-
nodeMap
-
stackPerEnd
-
-
Constructor Details
-
PipelineNodeGraphVisitor
public PipelineNodeGraphVisitor(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
-
-
Method Details
-
chunkStart
public void chunkStart(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode startNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode beforeBlock, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
chunkStartin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
chunkStartin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
chunkEnd
public void chunkEnd(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode endNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode afterBlock, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
chunkEndin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
chunkEndin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
handleChunkDone
protected void handleChunkDone(@NonNull org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk) - Overrides:
handleChunkDonein classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
resetChunk
protected void resetChunk(@NonNull org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk) - Overrides:
resetChunkin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
parallelStart
public void parallelStart(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode branchNode, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
parallelStartin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
parallelStartin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
parallelEnd
public void parallelEnd(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelEndNode, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
parallelEndin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
parallelEndin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
parallelBranchStart
public void parallelBranchStart(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode branchStartNode, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
parallelBranchStartin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
parallelBranchStartin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
parallelBranchEnd
public void parallelBranchEnd(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode branchEndNode, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner) - Specified by:
parallelBranchEndin interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
parallelBranchEndin classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
atomNode
public void atomNode(@CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode before, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode atomNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode after, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scan) - Specified by:
atomNodein interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor- Overrides:
atomNodein classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
accumulatePipelineActions
protected void accumulatePipelineActions(org.jenkinsci.plugins.workflow.graph.FlowNode node) Find any Actions on this node, and add them to the pipelineActions collection until we can attach them to a FlowNodeWrapper. -
drainPipelineActions
Empty the pipelineActions buffer, returning its contents. -
getPipelineNodes
Description copied from interface:NodeGraphBuilderGives all pipeline nodes DAG graph- Specified by:
getPipelineNodesin interfaceNodeGraphBuilder
-
getPipelineNodes
public List<io.jenkins.blueocean.rest.model.BluePipelineNode> getPipelineNodes(io.jenkins.blueocean.rest.hal.Link parent) Description copied from interface:NodeGraphBuilderGives DAG graph as list ofBluePipelineNode- Specified by:
getPipelineNodesin interfaceNodeGraphBuilder
-
getPipelineNodeSteps
public List<io.jenkins.blueocean.rest.model.BluePipelineStep> getPipelineNodeSteps(String nodeId, io.jenkins.blueocean.rest.hal.Link parent) Description copied from interface:NodeGraphBuilderGives all the steps inside given nodeId- Specified by:
getPipelineNodeStepsin interfaceNodeGraphBuilder
-
getPipelineNodeSteps
public List<io.jenkins.blueocean.rest.model.BluePipelineStep> getPipelineNodeSteps(io.jenkins.blueocean.rest.hal.Link parent) Description copied from interface:NodeGraphBuilderGives all the steps in this pipeline- Specified by:
getPipelineNodeStepsin interfaceNodeGraphBuilder
-
getPipelineNodeStep
public io.jenkins.blueocean.rest.model.BluePipelineStep getPipelineNodeStep(String id, io.jenkins.blueocean.rest.hal.Link parent) Description copied from interface:NodeGraphBuilderGive the step for given id- Specified by:
getPipelineNodeStepin interfaceNodeGraphBuilder
-
union
public List<io.jenkins.blueocean.rest.model.BluePipelineNode> union(List<FlowNodeWrapper> previousNodes, io.jenkins.blueocean.rest.hal.Link parent) Description copied from interface:NodeGraphBuilderCreate union of last successful run and this partial run- Specified by:
unionin interfaceNodeGraphBuilder
-
isDeclarative
public boolean isDeclarative()
-