Class PipelineNodeUtil
java.lang.Object
io.jenkins.plugins.pipelinegraphview.utils.PipelineNodeUtil
- Author:
- Vivek Pandey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.base.Predicate<org.jenkinsci.plugins.workflow.graph.FlowNode> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertLogToString(AnnotatedLargeText<? extends org.jenkinsci.plugins.workflow.graph.FlowNode> log, Long startByte) static StringgetArgumentsAsString(org.jenkinsci.plugins.workflow.graph.FlowNode node) static StringgetCauseOfBlockage(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 StringgetDisplayName(org.jenkinsci.plugins.workflow.graph.FlowNode node) static StringgetExceptionText(org.jenkinsci.plugins.workflow.graph.FlowNode node) static AnnotatedLargeText<? extends org.jenkinsci.plugins.workflow.graph.FlowNode>getLogText(org.jenkinsci.plugins.workflow.graph.FlowNode node) static org.jenkinsci.plugins.workflow.actions.TagsActiongetSyntheticStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisAgentStart(org.jenkinsci.plugins.workflow.graph.FlowNode node) Determine if the givenFlowNodeis the initialStepStartNodefor anExecutorStep.static booleanisJenkinsFailureException(Throwable exception) protected static booleanisParallelBlock(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisParallelBranch(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisPaused(org.jenkinsci.plugins.workflow.graph.FlowNode step) static booleanisPausedForInputStep(org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode step, org.jenkinsci.plugins.workflow.support.steps.input.InputAction inputAction) static booleanisPostSyntheticStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisPreSyntheticStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisSkippedStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisStep(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisSyntheticStage(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisUnhandledException(org.jenkinsci.plugins.workflow.graph.FlowNode node)
-
Field Details
-
isLoggable
public static final com.google.common.base.Predicate<org.jenkinsci.plugins.workflow.graph.FlowNode> isLoggable
-
-
Constructor Details
-
PipelineNodeUtil
public PipelineNodeUtil()
-
-
Method Details
-
getDisplayName
-
isStep
public static boolean isStep(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) -
isUnhandledException
public static boolean isUnhandledException(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
getArgumentsAsString
public static String getArgumentsAsString(@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'sFlowNodenodeBlock- 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) -
isPaused
public static boolean isPaused(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode step) -
isParallelBlock
protected static boolean isParallelBlock(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node) -
isAgentStart
public static boolean isAgentStart(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) Determine if the givenFlowNodeis the initialStepStartNodefor anExecutorStep.- Parameters:
node- a possibly nullFlowNode- Returns:
- true if
nodeis the non-body start of the agent execution.
-
getLogText
public static AnnotatedLargeText<? extends org.jenkinsci.plugins.workflow.graph.FlowNode> getLogText(@Nullable org.jenkinsci.plugins.workflow.graph.FlowNode node) -
convertLogToString
public static String convertLogToString(AnnotatedLargeText<? extends org.jenkinsci.plugins.workflow.graph.FlowNode> log, Long startByte) throws IOException - Throws:
IOException
-
getExceptionText
-
isJenkinsFailureException
-