Class MilestoneStepExecution

java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<Void>
org.jenkinsci.plugins.pipeline.milestone.MilestoneStepExecution
All Implemented Interfaces:
Serializable

public class MilestoneStepExecution extends org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<Void>
See Also:
  • Constructor Details

    • MilestoneStepExecution

      public MilestoneStepExecution(@NonNull org.jenkinsci.plugins.workflow.steps.StepContext context, @CheckForNull String label, @CheckForNull Integer ordinal, boolean unsafe)
  • Method Details

    • getBuildsToCancel

      public static Map<Integer,Integer> getBuildsToCancel(int buildNumber, @CheckForNull Integer ordinal, @NonNull Map<Integer,Integer> milestones)
      Parameters:
      buildNumber - The build number currently querying for builds to cancel
      ordinal - The ordinal the build just passed. null means it just started.
      milestones - A map keyed by build numbers recording their current milestone.
      Returns:
      A subset of build numbers among the given milestones eligible for cancellation.
    • run

      public Void run() throws Exception
      Specified by:
      run in class org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<Void>
      Throws:
      Exception