Class ExecutorStep

java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
org.jenkinsci.plugins.workflow.support.steps.ExecutorStep
All Implemented Interfaces:
ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>, Serializable

public final class ExecutorStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable
Grabs an Executor on a node of your choice and runs its block with that executor occupied.

Used like:

     node("foo") {
         // execute some stuff in a build agent that has a label "foo" while workflow has this build agent
     }
 
See Also:
  • Constructor Details

    • ExecutorStep

      @DataBoundConstructor public ExecutorStep(String label)
  • Method Details

    • getLabel

      @CheckForNull public String getLabel()
    • start

      public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) throws Exception
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.Step
      Throws:
      Exception