Remove usage of deprecated docker image (#6969)

This commit is contained in:
Trask Stalnaker 2022-10-26 11:22:34 -07:00 committed by GitHub
parent d7df94ad5b
commit 0575ab4fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 36 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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

View File

@ -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"