Class ContainerExecDecorator
- java.lang.Object
-
- hudson.LauncherDecorator
-
- org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator
-
- All Implemented Interfaces:
ExtensionPoint
,Closeable
,Serializable
,AutoCloseable
public class ContainerExecDecorator extends LauncherDecorator implements Serializable, Closeable
This decorator interacts directly with the Kubernetes exec API to run commands inside a container. It does not use the Jenkins agent to execute commands.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMMAND_FINISHED_TIMEOUT_MS
time in milliseconds to wait for checking whether the process immediately returned
-
Constructor Summary
Constructors Constructor Description ContainerExecDecorator()
ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace)
Deprecated.ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String path, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished)
Deprecated.ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace, org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander)
Deprecated.ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace, org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander, FilePath ws)
Deprecated.ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished)
Deprecated.ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished, String namespace)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Launcher
decorate(Launcher launcher, Node node)
io.fabric8.kubernetes.client.KubernetesClient
getClient()
Deprecated.String
getContainerName()
org.jenkinsci.plugins.workflow.steps.EnvironmentExpander
getEnvironmentExpander()
EnvVars
getGlobalVars()
String
getNamespace()
Deprecated.org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesNodeContext
getNodeContext()
String
getPodName()
Deprecated.EnvVars
getRunContextEnvVars()
void
setClient(io.fabric8.kubernetes.client.KubernetesClient client)
Deprecated.void
setContainerName(String containerName)
void
setEnvironmentExpander(org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander)
void
setGlobalVars(EnvVars globalVars)
void
setKubernetesClient(io.fabric8.kubernetes.client.KubernetesClient client)
Deprecated.void
setNamespace(String namespace)
Deprecated.void
setNodeContext(org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesNodeContext nodeContext)
void
setPodName(String podName)
Deprecated.void
setRunContextEnvVars(EnvVars rcVars)
void
setShell(String shell)
-
Methods inherited from class hudson.LauncherDecorator
all
-
-
-
-
Field Detail
-
COMMAND_FINISHED_TIMEOUT_MS
public static final int COMMAND_FINISHED_TIMEOUT_MS
time in milliseconds to wait for checking whether the process immediately returned- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContainerExecDecorator
public ContainerExecDecorator()
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace, org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander, FilePath ws)
Deprecated.
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace, org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander)
Deprecated.
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String namespace)
Deprecated.
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished, String namespace)
Deprecated.
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished)
Deprecated.
-
ContainerExecDecorator
@Deprecated public ContainerExecDecorator(io.fabric8.kubernetes.client.KubernetesClient client, String podName, String containerName, String path, AtomicBoolean alive, CountDownLatch started, CountDownLatch finished)
Deprecated.
-
-
Method Detail
-
getClient
@Deprecated public io.fabric8.kubernetes.client.KubernetesClient getClient()
Deprecated.
-
setClient
@Deprecated public void setClient(io.fabric8.kubernetes.client.KubernetesClient client)
Deprecated.
-
getPodName
@Deprecated public String getPodName()
Deprecated.
-
setPodName
@Deprecated public void setPodName(String podName)
Deprecated.
-
getNamespace
@Deprecated public String getNamespace()
Deprecated.
-
setNamespace
@Deprecated public void setNamespace(String namespace)
Deprecated.
-
getContainerName
public String getContainerName()
-
setContainerName
public void setContainerName(String containerName)
-
getEnvironmentExpander
public org.jenkinsci.plugins.workflow.steps.EnvironmentExpander getEnvironmentExpander()
-
setEnvironmentExpander
public void setEnvironmentExpander(org.jenkinsci.plugins.workflow.steps.EnvironmentExpander environmentExpander)
-
getGlobalVars
public EnvVars getGlobalVars()
-
setGlobalVars
public void setGlobalVars(EnvVars globalVars)
-
setRunContextEnvVars
public void setRunContextEnvVars(EnvVars rcVars)
-
getRunContextEnvVars
public EnvVars getRunContextEnvVars()
-
setShell
public void setShell(String shell)
-
getNodeContext
public org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesNodeContext getNodeContext()
-
setNodeContext
public void setNodeContext(org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesNodeContext nodeContext)
-
decorate
public Launcher decorate(Launcher launcher, Node node)
- Specified by:
decorate
in classLauncherDecorator
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
setKubernetesClient
@Deprecated public void setKubernetesClient(io.fabric8.kubernetes.client.KubernetesClient client)
Deprecated.
-
-