Class EphemeralContainerStepExecution

java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
io.jenkins.plugins.kubernetes.ephemeral.EphemeralContainerStepExecution
All Implemented Interfaces:
Serializable

public class EphemeralContainerStepExecution extends org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
Ephemeral Container step execution is responsible for creating a new Ephemeral Container to the current Kubernetes agent Pod. A container is added to the Pod with a file monitor command that waits until a file is created to signal the container should exit. This implementation has a number of retry mechanisms to deal with high kubelet load that may cause a context deadline miss or conflict errors patching the Pod itself.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution

    org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.Block, org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.TailCall
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected void
     
    void
    stop(Throwable cause)
     

    Methods inherited from class org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution

    blocksRestart, getStatus, onResume, run

    Methods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution

    acceptAll, acceptAll, applyAll, applyAll, getContext, getStatusBounded

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • start

      public boolean start() throws Exception
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.StepExecution
      Throws:
      Exception
    • startEphemeralContainerWithRetry

      protected void startEphemeralContainerWithRetry() throws Exception
      Throws:
      Exception
    • stop

      public void stop(@NonNull Throwable cause) throws Exception
      Overrides:
      stop in class org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution
      Throws:
      Exception