Remove usage of deprecated docker image
MODIFY
.github/workflows/pr-smoke-test-play-images.yml
.github/workflows/pr-smoke-test-play-images.yml
@@ -16,25 +16,3 @@ jobs:
# https://github.com/playframework/playframework/pull/10819
skip-java-17: true
skip-java-19: true
- skip-java-20: true
-
- build-java-15:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Set up JDK for running Gradle
- uses: actions/setup-java@v3
- with:
- distribution: temurin
- java-version: 17
-
- - name: Set up Gradle cache
- uses: gradle/gradle-build-action@v2
- with:
- cache-read-only: true
-
- # Play doesn't support Java 16 (or 17) yet
- # https://github.com/playframework/playframework/pull/10819
- - name: Build Java 15 Docker image
- run: ./gradlew :smoke-tests:images:play:jibDockerBuild -PtargetJDK=15 -Djib.httpTimeout=120000 -Djib.console=plain

MODIFY
.github/workflows/publish-smoke-test-play-images.yml
.github/workflows/publish-smoke-test-play-images.yml
@@ -19,7 +19,6 @@ jobs:
# https://github.com/playframework/playframework/pull/10819
skip-java-17: true
skip-java-19: true
- skip-java-20: true
publish-java-15:
runs-on: ubuntu-latest

MODIFY
.github/workflows/reusable-smoke-test-images.yml
.github/workflows/reusable-smoke-test-images.yml
@@ -21,9 +21,6 @@ on:
skip-java-19:
type: boolean
required: false
- skip-java-20:
- type: boolean
- required: false
jobs:
build:
@@ -67,7 +64,3 @@ jobs:
- name: Build Java 19 Docker image
if: ${{ !inputs.skip-java-19 }}
run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=19 -Djib.httpTimeout=120000 -Djib.console=plain
-
- - name: Build Java 20 Docker image
- if: ${{ !inputs.skip-java-20 }}
- run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=20 -Djib.httpTimeout=120000 -Djib.console=plain

MODIFY
smoke-tests/images/grpc/build.gradle.kts
smoke-tests/images/grpc/build.gradle.kts
@@ -28,7 +28,15 @@ val targetJDK = project.findProperty("targetJDK") ?: "11"
val tag = findProperty("tag")
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
+java {
+ // this is needed to avoid jib failing with
+ // "Your project is using Java 17 but the base image is for Java 8"
+ // (it seems the jib plugins does not understand toolchains yet)
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+}
+
jib {
- from.image = "openjdk:$targetJDK"
+ from.image = "eclipse-temurin:$targetJDK"
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-grpc:jdk$targetJDK-$tag"
}

MODIFY
smoke-tests/images/play/build.gradle.kts
smoke-tests/images/play/build.gradle.kts
@@ -29,10 +29,19 @@ dependencies {
val targetJDK = project.findProperty("targetJDK") ?: "11"
-val tag = findProperty("tag") ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
+val tag = findProperty("tag")
+ ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
+
+java {
+ // this is needed to avoid jib failing with
+ // "Your project is using Java 17 but the base image is for Java 8"
+ // (it seems the jib plugins does not understand toolchains yet)
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+}
jib {
- from.image = "openjdk:$targetJDK"
+ from.image = "eclipse-temurin:$targetJDK"
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-play:jdk$targetJDK-$tag"
container.mainClass = "play.core.server.ProdServerStart"
}

MODIFY
smoke-tests/images/quarkus/build.gradle.kts
smoke-tests/images/quarkus/build.gradle.kts
@@ -28,10 +28,19 @@ quarkus {
val targetJDK = project.findProperty("targetJDK") ?: "11"
-val tag = findProperty("tag") ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
+val tag = findProperty("tag")
+ ?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
+
+java {
+ // this is needed to avoid jib failing with
+ // "Your project is using Java 17 but the base image is for Java 8"
+ // (it seems the jib plugins does not understand toolchains yet)
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+}
jib {
- from.image = "openjdk:$targetJDK"
+ from.image = "eclipse-temurin:$targetJDK"
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-quarkus:jdk$targetJDK-$tag"
container {
mainClass = "bogus" // to suppress Jib warning about missing main class

MODIFY
smoke-tests/images/servlet/build.gradle.kts
smoke-tests/images/servlet/build.gradle.kts
@@ -134,7 +134,11 @@ fun configureImage(parentTask: TaskProvider<out Task>, server: String, dockerfil
val image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-$server:$version-jdk$jdk$vmSuffix$platformSuffix-$extraTag"
val jdkImage = if (vm == "hotspot") {
- if (jdk == "19" || jdk == "20") {
+ if (jdk == "20") {
+ // "The only tags which will continue to receive updates beyond July 2022 will be Early Access
+ // builds (which are sourced from jdk.java.net), as those are not published/supported by any
+ // of the above projects."
+ // (see https://hub.docker.com/_/openjdk)
"openjdk:$jdk"
} else {
"eclipse-temurin:$jdk"

Remove usage of deprecated docker image (#6969)