Skip to content

Commit 0575ab4

Browse files
authored
Remove usage of deprecated docker image (#6969)
1 parent d7df94a commit 0575ab4

7 files changed

+36
-36
lines changed

.github/workflows/pr-smoke-test-play-images.yml

-22
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,3 @@ jobs:
1616
# https://github.com/playframework/playframework/pull/10819
1717
skip-java-17: true
1818
skip-java-19: true
19-
skip-java-20: true
20-
21-
build-java-15:
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@v3
25-
26-
- name: Set up JDK for running Gradle
27-
uses: actions/setup-java@v3
28-
with:
29-
distribution: temurin
30-
java-version: 17
31-
32-
- name: Set up Gradle cache
33-
uses: gradle/gradle-build-action@v2
34-
with:
35-
cache-read-only: true
36-
37-
# Play doesn't support Java 16 (or 17) yet
38-
# https://github.com/playframework/playframework/pull/10819
39-
- name: Build Java 15 Docker image
40-
run: ./gradlew :smoke-tests:images:play:jibDockerBuild -PtargetJDK=15 -Djib.httpTimeout=120000 -Djib.console=plain

.github/workflows/publish-smoke-test-play-images.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
# https://github.com/playframework/playframework/pull/10819
2020
skip-java-17: true
2121
skip-java-19: true
22-
skip-java-20: true
2322

2423
publish-java-15:
2524
runs-on: ubuntu-latest

.github/workflows/reusable-smoke-test-images.yml

-7
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ on:
2121
skip-java-19:
2222
type: boolean
2323
required: false
24-
skip-java-20:
25-
type: boolean
26-
required: false
2724

2825
jobs:
2926
build:
@@ -67,7 +64,3 @@ jobs:
6764
- name: Build Java 19 Docker image
6865
if: ${{ !inputs.skip-java-19 }}
6966
run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=19 -Djib.httpTimeout=120000 -Djib.console=plain
70-
71-
- name: Build Java 20 Docker image
72-
if: ${{ !inputs.skip-java-20 }}
73-
run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=20 -Djib.httpTimeout=120000 -Djib.console=plain

smoke-tests/images/grpc/build.gradle.kts

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ val targetJDK = project.findProperty("targetJDK") ?: "11"
2828
val tag = findProperty("tag")
2929
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
3030

31+
java {
32+
// this is needed to avoid jib failing with
33+
// "Your project is using Java 17 but the base image is for Java 8"
34+
// (it seems the jib plugins does not understand toolchains yet)
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
37+
}
38+
3139
jib {
32-
from.image = "openjdk:$targetJDK"
40+
from.image = "eclipse-temurin:$targetJDK"
3341
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-grpc:jdk$targetJDK-$tag"
3442
}

smoke-tests/images/play/build.gradle.kts

+11-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,19 @@ dependencies {
2929

3030
val targetJDK = project.findProperty("targetJDK") ?: "11"
3131

32-
val tag = findProperty("tag") ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
32+
val tag = findProperty("tag")
33+
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
34+
35+
java {
36+
// this is needed to avoid jib failing with
37+
// "Your project is using Java 17 but the base image is for Java 8"
38+
// (it seems the jib plugins does not understand toolchains yet)
39+
sourceCompatibility = JavaVersion.VERSION_1_8
40+
targetCompatibility = JavaVersion.VERSION_1_8
41+
}
3342

3443
jib {
35-
from.image = "openjdk:$targetJDK"
44+
from.image = "eclipse-temurin:$targetJDK"
3645
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-play:jdk$targetJDK-$tag"
3746
container.mainClass = "play.core.server.ProdServerStart"
3847
}

smoke-tests/images/quarkus/build.gradle.kts

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,19 @@ quarkus {
2828

2929
val targetJDK = project.findProperty("targetJDK") ?: "11"
3030

31-
val tag = findProperty("tag") ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
31+
val tag = findProperty("tag")
32+
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
33+
34+
java {
35+
// this is needed to avoid jib failing with
36+
// "Your project is using Java 17 but the base image is for Java 8"
37+
// (it seems the jib plugins does not understand toolchains yet)
38+
sourceCompatibility = JavaVersion.VERSION_1_8
39+
targetCompatibility = JavaVersion.VERSION_1_8
40+
}
3241

3342
jib {
34-
from.image = "openjdk:$targetJDK"
43+
from.image = "eclipse-temurin:$targetJDK"
3544
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-quarkus:jdk$targetJDK-$tag"
3645
container {
3746
mainClass = "bogus" // to suppress Jib warning about missing main class

smoke-tests/images/servlet/build.gradle.kts

+5-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ fun configureImage(parentTask: TaskProvider<out Task>, server: String, dockerfil
134134
val image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-$server:$version-jdk$jdk$vmSuffix$platformSuffix-$extraTag"
135135

136136
val jdkImage = if (vm == "hotspot") {
137-
if (jdk == "19" || jdk == "20") {
137+
if (jdk == "20") {
138+
// "The only tags which will continue to receive updates beyond July 2022 will be Early Access
139+
// builds (which are sourced from jdk.java.net), as those are not published/supported by any
140+
// of the above projects."
141+
// (see https://hub.docker.com/_/openjdk)
138142
"openjdk:$jdk"
139143
} else {
140144
"eclipse-temurin:$jdk"

0 commit comments

Comments
 (0)