From bdd728872c4674bc39dc69f2bbfef7bd9ac2914c Mon Sep 17 00:00:00 2001 From: Kevin Gordillo Date: Wed, 3 Jun 2026 20:18:56 +0000 Subject: [PATCH 1/2] chore(run): upgrade helloworld sample to Java 25 --- run/helloworld/Dockerfile | 4 ++-- run/helloworld/pom.xml | 18 +++++++++++++----- .../helloworld/HelloworldApplicationTests.java | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/run/helloworld/Dockerfile b/run/helloworld/Dockerfile index 19f125ef8e9..1396b214fd3 100644 --- a/run/helloworld/Dockerfile +++ b/run/helloworld/Dockerfile @@ -15,7 +15,7 @@ # [START cloudrun_helloworld_dockerfile] # Use the official maven image to create a build artifact. # https://hub.docker.com/_/maven -FROM maven:3-eclipse-temurin-17-alpine as builder +FROM maven:3-eclipse-temurin-25-alpine as builder # Copy local code to the container image. WORKDIR /app @@ -27,7 +27,7 @@ RUN mvn package -DskipTests # Use Eclipse Temurin for base image. # https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds -FROM eclipse-temurin:17.0.18_8-jre-alpine +FROM eclipse-temurin:25-jre-alpine # Copy the jar to the production image from the builder stage. COPY --from=builder /app/target/helloworld-*.jar /helloworld.jar diff --git a/run/helloworld/pom.xml b/run/helloworld/pom.xml index 70e213d033f..0670c472140 100644 --- a/run/helloworld/pom.xml +++ b/run/helloworld/pom.xml @@ -24,7 +24,7 @@ limitations under the License. com.google.cloud.samples shared-configuration - 1.2.0 + 1.2.2 @@ -41,9 +41,9 @@ limitations under the License. UTF-8 UTF-8 - 17 - 17 - 3.2.2 + 25 + 25 + 3.5.0 @@ -68,6 +68,11 @@ limitations under the License. + + org.jacoco + jacoco-maven-plugin + 0.8.14 + org.springframework.boot spring-boot-maven-plugin @@ -84,8 +89,11 @@ limitations under the License. com.google.cloud.tools jib-maven-plugin - 3.4.0 + 3.4.6 + + eclipse-temurin:25-jre-alpine + gcr.io/PROJECT_ID/helloworld diff --git a/run/helloworld/src/test/java/com/example/helloworld/HelloworldApplicationTests.java b/run/helloworld/src/test/java/com/example/helloworld/HelloworldApplicationTests.java index c35e651b6bc..093c2c59ecb 100644 --- a/run/helloworld/src/test/java/com/example/helloworld/HelloworldApplicationTests.java +++ b/run/helloworld/src/test/java/com/example/helloworld/HelloworldApplicationTests.java @@ -29,7 +29,7 @@ import org.springframework.test.web.servlet.MockMvc; @RunWith(SpringRunner.class) -@SpringBootTest +@SpringBootTest(classes = HelloworldApplication.class) @AutoConfigureMockMvc public class HelloworldApplicationTests { From 54873a1cce2292230a0b6375a31c637865e4d721 Mon Sep 17 00:00:00 2001 From: Kevin Gordillo Date: Wed, 3 Jun 2026 22:21:24 +0000 Subject: [PATCH 2/2] fix: kokoro btlr compatability only with Java 21 in pom.xml workaround --- run/helloworld/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run/helloworld/pom.xml b/run/helloworld/pom.xml index 0670c472140..0242b3f715e 100644 --- a/run/helloworld/pom.xml +++ b/run/helloworld/pom.xml @@ -41,8 +41,9 @@ limitations under the License. UTF-8 UTF-8 - 25 - 25 + + 21 + 21 3.5.0