Class EphemeralContainerStep

java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
io.jenkins.plugins.kubernetes.ephemeral.EphemeralContainerStep
All Implemented Interfaces:
ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>, Serializable
Direct Known Subclasses:
EphemeralContainerStep.DeprecatedEphemeralContainerStep

public class EphemeralContainerStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable
Pipeline step that runs in an ephemeral container of the current Kubernetes Pod agent.
See Also:
  • Constructor Details

    • EphemeralContainerStep

      @DataBoundConstructor public EphemeralContainerStep(String image)
  • Method Details

    • getImage

      public String getImage()
    • getEnvVars

      @NonNull public List<org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar> getEnvVars()
    • setEnvVars

      @DataBoundSetter public void setEnvVars(List<org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar> envVars)
    • getShell

      public String getShell()
    • setShell

      @DataBoundSetter public void setShell(String shell)
    • getTargetContainer

      public String getTargetContainer()
    • setTargetContainer

      @DataBoundSetter public void setTargetContainer(String targetContainer)
    • isAlwaysPullImage

      public boolean isAlwaysPullImage()
    • setAlwaysPullImage

      @DataBoundSetter public void setAlwaysPullImage(boolean alwaysPullImage)
    • getRunAsUser

      @CheckForNull public String getRunAsUser()
    • getRunAsUserLong

      @CheckForNull public Long getRunAsUserLong()
    • setRunAsUser

      @DataBoundSetter public void setRunAsUser(@CheckForNull String runAsUser)
    • getRunAsGroup

      @CheckForNull public String getRunAsGroup()
    • getRunAsGroupLong

      @CheckForNull public Long getRunAsGroupLong()
    • setRunAsGroup

      @DataBoundSetter public void setRunAsGroup(@CheckForNull String runAsGroup)
    • getCommand

      @CheckForNull public List<String> getCommand()
    • setCommand

      @DataBoundSetter public void setCommand(@CheckForNull List<String> command)
    • setCommandLine

      @DataBoundSetter @Deprecated public void setCommandLine(@CheckForNull String command)
      Deprecated.
      Use setCommand(List) for precise command construction. This setter is used by the snippet generator.
      Parameters:
      command - full command line
    • getCommandLine

      @CheckForNull public String getCommandLine()
      This returns the getCommand() joined with a space. It will not precisely round trip with setCommandLine(String) for example if one of the arguments contains a space.
      Returns:
      the command args joined by a space
    • start

      public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context)
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.Step