Class 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
  • Constructor Details

    • BluePipelineNode

      public BluePipelineNode()
  • Method Details

    • 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 field restart will value true
      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