Package io.jenkins.blueocean.rest.model
Class BluePipelineNode
- java.lang.Object
-
- io.jenkins.blueocean.rest.model.Resource
-
- io.jenkins.blueocean.rest.model.BluePipelineStep
-
- io.jenkins.blueocean.rest.model.BluePipelineNode
-
- All Implemented Interfaces:
Reachable
public abstract class BluePipelineNode extends BluePipelineStep
Abstraction of Pipeline run node. This node is a node in Pipeline run and a vetext in DAG. Each sub-steps in this pipeline node is represented as edges. e.g.stage('build') { node{ echo "Building..." }} stage('test') { parallel 'unit':{ node{ echo "Unit testing..." } },'integration':{ node{ echo "Integration testing..." } }} stage('deploy') { node{ echo "Deploying" }}
Above pipeline script is modeled as:build : test test : unit, integration unit : deploy integration: deploy deploy /---- unit ----------\ build--->test--->/ \------> deploy \----- integration ---/
- Author:
- Vivek Pandey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BluePipelineNode.Edge
Represents edge of pipeline flow graph
-
Field Summary
-
Fields inherited from class io.jenkins.blueocean.rest.model.BluePipelineStep
ACTIONS, DISPLAY_DESCRIPTION, DISPLAY_NAME, DURATION_IN_MILLIS, EDGES, ID, RESULT, START_TIME, TYPE
-
-
Constructor Summary
Constructors Constructor Description BluePipelineNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract String
getCauseOfBlockage()
If the node execution is blocked, its non null, explaining the cause.abstract List<BluePipelineNode.Edge>
getEdges()
All the outgoing edges from this nodeabstract String
getFirstParent()
abstract BluePipelineStepContainer
getSteps()
abstract boolean
isRestartable()
abstract org.kohsuke.stapler.HttpResponse
restart(org.kohsuke.stapler.StaplerRequest request)
-
Methods inherited from class io.jenkins.blueocean.rest.model.BluePipelineStep
getActions, getDisplayDescription, getDisplayName, getDurationInMillis, getId, getInputStep, getLog, getResult, getStartTime, getStartTimeString, getStateObj, getStepType, getType, submitInputStep
-
-
-
-
Method Detail
-
getCauseOfBlockage
@Exported(name="causeOfBlockage") public abstract String getCauseOfBlockage()
If the node execution is blocked, its non null, explaining the cause. Otherwise its null.
-
getSteps
@Navigable public abstract BluePipelineStepContainer getSteps()
- Returns:
- Steps inside a Pipeline Stage or Parallel branch
-
isRestartable
@Exported public abstract boolean isRestartable()
- Returns:
true
if the pipeline can be restarted from this node
-
getFirstParent
@Exported @CheckForNull public abstract String getFirstParent()
- Returns:
- the id of the first immediate parent
-
restart
@POST @WebMethod(name="restart") public abstract org.kohsuke.stapler.HttpResponse restart(org.kohsuke.stapler.StaplerRequest request)
- Parameters:
request
- To restart the content must be simple json body with a fieldrestart
will valuetrue
- Returns:
- the response content will be
BlueRun
-
getEdges
@Exported(name="edges", inline=true) public abstract List<BluePipelineNode.Edge> getEdges()
All the outgoing edges from this node- Returns:
- edges
-
-