Remove usage of deprecated docker image (#6969)
This commit is contained in:
parent
d7df94ad5b
commit
0575ab4fe3
|
@ -16,25 +16,3 @@ jobs:
|
||||||
# https://github.com/playframework/playframework/pull/10819
|
# https://github.com/playframework/playframework/pull/10819
|
||||||
skip-java-17: true
|
skip-java-17: true
|
||||||
skip-java-19: 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
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ jobs:
|
||||||
# https://github.com/playframework/playframework/pull/10819
|
# https://github.com/playframework/playframework/pull/10819
|
||||||
skip-java-17: true
|
skip-java-17: true
|
||||||
skip-java-19: true
|
skip-java-19: true
|
||||||
skip-java-20: true
|
|
||||||
|
|
||||||
publish-java-15:
|
publish-java-15:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -21,9 +21,6 @@ on:
|
||||||
skip-java-19:
|
skip-java-19:
|
||||||
type: boolean
|
type: boolean
|
||||||
required: false
|
required: false
|
||||||
skip-java-20:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -67,7 +64,3 @@ jobs:
|
||||||
- name: Build Java 19 Docker image
|
- name: Build Java 19 Docker image
|
||||||
if: ${{ !inputs.skip-java-19 }}
|
if: ${{ !inputs.skip-java-19 }}
|
||||||
run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=19 -Djib.httpTimeout=120000 -Djib.console=plain
|
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
|
|
||||||
|
|
|
@ -28,7 +28,15 @@ val targetJDK = project.findProperty("targetJDK") ?: "11"
|
||||||
val tag = findProperty("tag")
|
val tag = findProperty("tag")
|
||||||
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())
|
?: 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 {
|
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"
|
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-grpc:jdk$targetJDK-$tag"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,19 @@ dependencies {
|
||||||
|
|
||||||
val targetJDK = project.findProperty("targetJDK") ?: "11"
|
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 {
|
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"
|
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-play:jdk$targetJDK-$tag"
|
||||||
container.mainClass = "play.core.server.ProdServerStart"
|
container.mainClass = "play.core.server.ProdServerStart"
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,19 @@ quarkus {
|
||||||
|
|
||||||
val targetJDK = project.findProperty("targetJDK") ?: "11"
|
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 {
|
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"
|
to.image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-quarkus:jdk$targetJDK-$tag"
|
||||||
container {
|
container {
|
||||||
mainClass = "bogus" // to suppress Jib warning about missing main class
|
mainClass = "bogus" // to suppress Jib warning about missing main class
|
||||||
|
|
|
@ -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 image = "ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-$server:$version-jdk$jdk$vmSuffix$platformSuffix-$extraTag"
|
||||||
|
|
||||||
val jdkImage = if (vm == "hotspot") {
|
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"
|
"openjdk:$jdk"
|
||||||
} else {
|
} else {
|
||||||
"eclipse-temurin:$jdk"
|
"eclipse-temurin:$jdk"
|
||||||
|
|
Loading…
Reference in New Issue