@Override // TODO Revisit for JENKINS-40161 public void onResume() { super.onResume(); LOGGER.log(Level.FINE, "onResume"); try { KubernetesNodeContext nodeContext = new KubernetesNodeContext(getContext()); client = nodeContext.connectToCloud(); decorator.setKubernetesClient(client); } catch (Exception e) { ContainerStepExecution.this.getContext().onFailure(e); } }
LOGGER.log(Level.FINE, "Starting containerLog step."); KubernetesNodeContext nodeContext = new KubernetesNodeContext(getContext()); client = nodeContext.connectToCloud(); String podName = nodeContext.getPodName(); ContainerResource<String, LogWatch, InputStream, PipedOutputStream, OutputStream, PipedInputStream, String, ExecWatch> container = client.pods() .inNamespace(nodeContext.getNamespace()) .withName(podName) .inContainer(containerName);
String shell = step.getShell(); KubernetesNodeContext nodeContext = new KubernetesNodeContext(getContext()); client = nodeContext.connectToCloud(); decorator.setPodName(nodeContext.getPodName()); decorator.setContainerName(containerName); decorator.setNamespace(nodeContext.getNamespace()); decorator.setEnvironmentExpander(env); decorator.setWs(getContext().get(FilePath.class));