Skip to content

Commit

Permalink
openjdk images are deprecated and they have started removing old ta…
Browse files Browse the repository at this point in the history
…gs (#1542)
  • Loading branch information
Vlatombe authored May 6, 2024
1 parent c646b71 commit 9de581f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,15 @@ public void runWithEnvVariables() throws Exception {
/* Varies according to agent image:
r.assertLogContains("JNLP_JAVA_HOME = /usr/local/openjdk-8\n", b);
*/
r.assertLogContains("JAVA7_HOME = /usr/lib/jvm/java-1.7-openjdk/jre\n", b);
r.assertLogContains("JAVA8_HOME = /usr/lib/jvm/java-1.8-openjdk/jre\n", b);
r.assertLogContains("JAVA17_HOME = /opt/java/openjdk\n", b);
r.assertLogContains("JAVA21_HOME = /opt/java/openjdk\n", b);

// check that we are not filtering too much
r.assertLogContains("INSIDE_JAVA_HOME_X = java-home-x\n", b);
r.assertLogContains("OUTSIDE_JAVA_HOME_X = java-home-x\n", b);
r.assertLogContains("JNLP_JAVA_HOME_X = java-home-x\n", b);
r.assertLogContains("JAVA7_HOME_X = java-home-x\n", b);
r.assertLogContains("JAVA8_HOME_X = java-home-x\n", b);
r.assertLogContains("JAVA17_HOME_X = java-home-x\n", b);
r.assertLogContains("JAVA21_HOME_X = java-home-x\n", b);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ podTemplate(
secretEnvVar(key: 'EMPTY_POD_ENV_VAR_FROM_SECRET', secretName: 'empty-secret', secretKey: 'password')
],
containers: [
containerTemplate(name: 'busybox', image: 'busybox', ttyEnabled: true, command: '/bin/cat',
containerTemplate(name: 'busybox', image: 'busybox', command: 'sleep infinity',
envVars: [
containerEnvVar(key: 'CONTAINER_ENV_VAR_LEGACY', value: 'container-env-var-value'),
envVar(key: 'CONTAINER_ENV_VAR', value: 'container-env-var-value'),
secretEnvVar(key: 'CONTAINER_ENV_VAR_FROM_SECRET', secretName: 'container-secret', secretKey: 'password')
],
),
containerTemplate(name: 'java7', image: 'openjdk:7u151-jre-alpine', ttyEnabled: true, command: '/bin/cat'),
containerTemplate(name: 'java8', image: 'openjdk:8u151-jre-alpine', ttyEnabled: true, command: '/bin/cat')
containerTemplate(name: 'java17', image: 'eclipse-temurin:17-jre-ubi9-minimal', command: 'sleep infinity'),
containerTemplate(name: 'java21', image: 'eclipse-temurin:21-jre-ubi9-minimal', command: 'sleep infinity')
]) {

node(POD_LABEL) {
Expand Down Expand Up @@ -53,16 +53,16 @@ podTemplate(
echo JNLP_JAVA_HOME_X = $JAVA_HOME_X
'''
}
container('java7') {
container('java17') {
sh '''set +x
echo JAVA7_HOME = $JAVA_HOME
echo JAVA7_HOME_X = $JAVA_HOME_X
echo JAVA17_HOME = $JAVA_HOME
echo JAVA17_HOME_X = $JAVA_HOME_X
'''
}
container('java8') {
container('java21') {
sh '''set +x
echo JAVA8_HOME = $JAVA_HOME
echo JAVA8_HOME_X = $JAVA_HOME_X
echo JAVA21_HOME = $JAVA_HOME
echo JAVA21_HOME_X = $JAVA_HOME_X
'''
}
}
Expand Down

0 comments on commit 9de581f

Please sign in to comment.