Skip to content

Commit

Permalink
Upgrade contract tests to utilize Java version 21.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed Nov 28, 2024
1 parent bf4f265 commit 8e4558d
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1

Expand All @@ -219,7 +219,7 @@ jobs:
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}

- name: Pull base image of Contract Tests Sample Apps
run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine

- name: Build snapshot with Gradle
uses: gradle/gradle-build-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-upstream-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1

Expand All @@ -136,7 +136,7 @@ jobs:
registry: public.ecr.aws

- name: Pull base image of Contract Tests Sample Apps
run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine

- name: Build snapshot with Gradle
uses: gradle/gradle-build-action@v3
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,28 @@ jobs:
with:
arguments: build integrationTests --stacktrace -PenableCoverage=true -PlocalDocker=true

- name: Set up Java version for tests
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Pull base image of Contract Tests Sample Apps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine

- name: Run contract tests
uses: gradle/gradle-build-action@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
arguments: contractTests -PlocalDocker=true -i

- name: Set up Java version for image build
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Get current version
if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-aws-sdk-v1",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-aws-sdk-v2",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
2 changes: 1 addition & 1 deletion appsignals-tests/images/grpc/grpc-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"grpc-client",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
2 changes: 1 addition & 1 deletion appsignals-tests/images/grpc/grpc-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"grpc-server",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-apache-http-client-app",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-native-http-client-app",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-netty-http-client-app",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-spring-mvc-client-app",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-http-server-netty-server",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-http-server-spring-mvc",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-http-server-tomcat",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
2 changes: 1 addition & 1 deletion appsignals-tests/images/jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-jdbc-app",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-kafka-kafka-consumers",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-tests-kafka-kafka-producers",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
2 changes: 1 addition & 1 deletion appsignals-tests/images/mock-collector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks {
}
jib {
configureImages(
"public.ecr.aws/docker/library/amazoncorretto:17-alpine",
"public.ecr.aws/docker/library/amazoncorretto:21-alpine",
"aws-appsignals-mock-collector",
localDocker = rootProject.property("localDocker")!! == "true",
multiPlatform = false,
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/corretto-slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/amazoncorretto:17-alpine-jdk
FROM public.ecr.aws/docker/library/amazoncorretto:21-alpine-jdk

# Copied from https://github.com/corretto/corretto-docker/blob/master/11/jre/alpine/Dockerfile
RUN apk update && apk add binutils && jlink --endian little --release-info $JAVA_HOME/release \
Expand Down

0 comments on commit 8e4558d

Please sign in to comment.