Class 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:
    Serialized Form
    • Constructor Detail

      • ExecutorStep

        @DataBoundConstructor
        public ExecutorStep​(String label)
    • Method Detail

      • 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