Class CpsBodyInvoker

java.lang.Object
org.jenkinsci.plugins.workflow.steps.BodyInvoker
org.jenkinsci.plugins.workflow.cps.CpsBodyInvoker

public final class CpsBodyInvoker extends org.jenkinsci.plugins.workflow.steps.BodyInvoker
Builder pattern for accumulating configuration for executing the body.

After various withXyz methods are invoked, start() gets called to schedule the execution. The actual state update happens from the launch(CpsThread,FlowHead) method, which is CpsVmThreadOnly.

Author:
Kohsuke Kawaguchi
See Also:
  • CpsBodyExecution
  • Method Details

    • withContext

      public CpsBodyInvoker withContext(Object override)
      Specified by:
      withContext in class org.jenkinsci.plugins.workflow.steps.BodyInvoker
    • withContexts

      public org.jenkinsci.plugins.workflow.steps.BodyInvoker withContexts(Collection<?> overrides)
      Overrides:
      withContexts in class org.jenkinsci.plugins.workflow.steps.BodyInvoker
    • withStartAction

      public CpsBodyInvoker withStartAction(Action a)
    • withCallback

      public CpsBodyInvoker withCallback(org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback callback)
      Specified by:
      withCallback in class org.jenkinsci.plugins.workflow.steps.BodyInvoker
    • withDisplayName

      public CpsBodyInvoker withDisplayName(@NonNull String name)
      Specified by:
      withDisplayName in class org.jenkinsci.plugins.workflow.steps.BodyInvoker
    • start

      public org.jenkinsci.plugins.workflow.cps.CpsBodyExecution start()
      Schedules the execution of the body. The actual launching of the body will be done later in launch(org.jenkinsci.plugins.workflow.cps.CpsThread) methods.
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.BodyInvoker