Skip to content

Commit

Permalink
Use explicitly a more recent jnlp-slave to avoid problems with c… (#631)
Browse files Browse the repository at this point in the history
Use explicitly a more recent jnlp-slave to avoid problems with cached…
  • Loading branch information
Vlatombe authored Oct 31, 2019
2 parents 4ce4fab + a226005 commit 33737fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import com.google.common.annotations.VisibleForTesting;
import io.fabric8.kubernetes.api.model.PodSpecFluent;
import org.apache.commons.lang.StringUtils;
import org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar;
Expand Down Expand Up @@ -93,8 +94,9 @@ public class PodTemplateBuilder {

private static final String WORKSPACE_VOLUME_NAME = "workspace-volume";

private static final String DEFAULT_JNLP_IMAGE = System
.getProperty(PodTemplateStepExecution.class.getName() + ".defaultImage", "jenkins/jnlp-slave:alpine");
@VisibleForTesting
static final String DEFAULT_JNLP_IMAGE = System
.getProperty(PodTemplateStepExecution.class.getName() + ".defaultImage", "jenkins/jnlp-slave:3.35-5-alpine");

private static final String JNLPMAC_REF = "\\$\\{computer.jnlpmac\\}";
private static final String NAME_REF = "\\$\\{computer.name\\}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private void validatePod(Pod pod, boolean fromYaml, boolean directConnection) {
assertEquals(2, containers.size());

assertEquals("busybox", containers.get("busybox").getImage());
assertEquals("jenkins/jnlp-slave:alpine", containers.get("jnlp").getImage());
assertEquals(DEFAULT_JNLP_IMAGE, containers.get("jnlp").getImage());

// check volumes and volume mounts
Map<String, Volume> volumes = pod.getSpec().getVolumes().stream()
Expand Down

0 comments on commit 33737fe

Please sign in to comment.