Class SimpleBuildStepExecution

  • All Implemented Interfaces:
    Serializable

    public class SimpleBuildStepExecution
    extends org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<Void>
    Provides the basic implementation of StepExecution which can be used to implement the Step.start(StepContext) method.

    A general example would be

    
     \@Override
     public StepExecution start(StepContext context) throws Exception {
         return new SimpleBuildStepExecution(new YourSimpleBuildStep(this), context);
     }
     

    where YourSimpleBuildStep is the describable instance that uses the context that extends from Step. For the context descriptor, it should extends from StepDescriptor and its getRequiredContext() should return at least REQUIRED_CONTEXT.

    See Also:
    Serialized Form
    • Field Detail

      • REQUIRED_CONTEXT

        public static final com.google.common.collect.ImmutableSet<? extends Class<?>> REQUIRED_CONTEXT
    • Constructor Detail

      • SimpleBuildStepExecution

        public SimpleBuildStepExecution​(SimpleBuildStep delegate,
                                        org.jenkinsci.plugins.workflow.steps.StepContext context)
    • Method Detail

      • run

        protected Void run()
                    throws Exception
        Specified by:
        run in class org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<Void>
        Throws:
        Exception
      • getStatus

        public String getStatus()
        Overrides:
        getStatus in class org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<Void>