From f5f967c6051fd5575ffd14c0a4f2a8f52c67ae6a Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 22 Jul 2021 15:18:21 +0300 Subject: [PATCH 1/2] Update GraalVM version tests --- .../java/io/quarkus/deployment/pkg/steps/GraalVMTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/deployment/src/test/java/io/quarkus/deployment/pkg/steps/GraalVMTest.java b/core/deployment/src/test/java/io/quarkus/deployment/pkg/steps/GraalVMTest.java index 43c5783d27d22..9c57d0e30f3fd 100644 --- a/core/deployment/src/test/java/io/quarkus/deployment/pkg/steps/GraalVMTest.java +++ b/core/deployment/src/test/java/io/quarkus/deployment/pkg/steps/GraalVMTest.java @@ -25,13 +25,15 @@ public void testGraalVMVersionDetected() { assertVersion(20, 3, MANDREL, Version .of(Stream.of("GraalVM Version 20.3.1.2-dev (Mandrel Distribution) (Java Version 11.0.8)"))); assertVersion(21, 1, MANDREL, Version - .of(Stream.of("native-image 21.1.0.0 Java 11 Mandrel Distribution (Java Version 11.0.11)"))); + .of(Stream.of("native-image 21.1.0.0-Final (Mandrel Distribution) (Java Version 11.0.11+9)"))); assertVersion(21, 1, MANDREL, Version - .of(Stream.of("GraalVM 21.1.0.0 Java 11 Mandrel Distribution (Java Version 11.0.11)"))); + .of(Stream.of("GraalVM 21.1.0.0-Final (Mandrel Distribution) (Java Version 11.0.11+9)"))); assertVersion(21, 1, ORACLE, Version .of(Stream.of("GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+5-jvmci-21.1-b02)"))); assertVersion(21, 1, ORACLE, Version .of(Stream.of("native-image 21.1.0.0 Java 11 CE (Java Version 11.0.11+5-jvmci-21.1-b02)"))); + assertVersion(21, 2, MANDREL, Version + .of(Stream.of("native-image 21.2.0.0-Final Mandrel Distribution (Java Version 11.0.12+7)"))); } static void assertVersion(int major, int minor, Distribution distro, Version version) { From 8fd302dfbc379ca6d5bfd3feb449d2eb073fa8e4 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 22 Jul 2021 15:30:53 +0300 Subject: [PATCH 2/2] Upgrade to GraalVM version to 21.2 --- .github/workflows/ci-actions-incremental.yml | 2 +- bom/application/pom.xml | 2 +- build-parent/pom.xml | 6 +++--- .../java/io/quarkus/deployment/pkg/steps/GraalVM.java | 4 ++-- docs/src/main/asciidoc/building-native-image.adoc | 10 +++++----- docs/src/main/asciidoc/platform.adoc | 4 ++-- independent-projects/bootstrap/bom/pom.xml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 4143365f71142..3c1aa55bf10fc 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -576,7 +576,7 @@ jobs: uses: DeLaGuardo/setup-graalvm@master if: startsWith(matrix.os-name, 'windows') with: - graalvm-version: '21.1.0.java11' + graalvm-version: '21.2.0.java11' - name: Install native-image component if: startsWith(matrix.os-name, 'windows') run: | diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 466866af6664e..c9f08e9e671a2 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -83,7 +83,7 @@ 3.2.1 2.1.0 - 21.1.0 + 21.2.0 1.0.9.Final 2.12.4 1.0.0.Final diff --git a/build-parent/pom.xml b/build-parent/pom.xml index b29a61a7498ba..bfd50be051249 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -36,8 +36,8 @@ - 21.1.0 - 21.0 + 21.2.0 + 21.2 2.40.0 3.1.7 @@ -132,7 +132,7 @@ 3.1 - quay.io/quarkus/ubi-quarkus-native-image:21.1-java11 + quay.io/quarkus/ubi-quarkus-native-image:21.2-java11 sh ${maven.multiModuleProjectDirectory}/.github/docker-prune.${script.extension} diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java index 8475baea7d1c9..748e598bc270e 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java @@ -12,11 +12,11 @@ static final class Version implements Comparable { static final Version UNVERSIONED = new Version("Undefined", -1, -1, Distribution.ORACLE); static final Version VERSION_20_3 = new Version("GraalVM 20.3", 20, 3, Distribution.ORACLE); - static final Version VERSION_21_0 = new Version("GraalVM 21.0", 21, 0, Distribution.ORACLE); static final Version VERSION_21_1 = new Version("GraalVM 21.1", 21, 1, Distribution.ORACLE); + static final Version VERSION_21_2 = new Version("GraalVM 21.2", 21, 2, Distribution.ORACLE); static final Version MINIMUM = VERSION_20_3; - static final Version CURRENT = VERSION_21_0; + static final Version CURRENT = VERSION_21_2; final String fullVersion; final int major; diff --git a/docs/src/main/asciidoc/building-native-image.adoc b/docs/src/main/asciidoc/building-native-image.adoc index 2553fe047c2f0..1dcc970780a77 100644 --- a/docs/src/main/asciidoc/building-native-image.adoc +++ b/docs/src/main/asciidoc/building-native-image.adoc @@ -512,7 +512,7 @@ Sample Dockerfile for building with Maven: [source,dockerfile,subs=attributes+] ---- ## Stage 1 : build with maven builder image with native capabilities -FROM quay.io/quarkus/ubi-quarkus-native-image:21.1.0-java11 AS build +FROM quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor} AS build COPY pom.xml /project/ COPY mvnw /project/mvnw COPY .mvn /project/.mvn @@ -550,7 +550,7 @@ Sample Dockerfile for building with Gradle: [source,dockerfile,subs=attributes+] ---- ## Stage 1 : build with maven builder image with native capabilities -FROM quay.io/quarkus/ubi-quarkus-native-image:21.1.0-java11 AS build +FROM quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor} AS build COPY gradlew /project/gradlew COPY gradle /project/gradle COPY build.gradle /project/ @@ -665,7 +665,7 @@ The process for Gradle is analogous. Running the build process in a container is also possible: -[source,bash] +[source,bash,subs=attributes+] --- cd target/native-image docker run \ @@ -674,13 +674,13 @@ docker run \ --v $(pwd):/work <1> -w /work <2> --entrypoint bin/sh \ - quay.io/quarkus/ubi-quarkus-native-image:21.1.0-java11 \ <3> + quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor} \ <3> -c "native-image $(cat native-image.args) -J-Xmx4g" <4> --- <1> Mount the host's directory `target/native-image` to the container's `/work`. Thus, the generated binary will also be written to this directory. <2> Switch the working directory to `/work`, which we have mounted in <1>. -<3> Use the `quay.io/quarkus/ubi-quarkus-native-image:21.1.0-java11` docker image introduced in <<#multistage-docker,Using a multi-stage Docker build>> to build the native image. +<3> Use the `quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor}` docker image introduced in <<#multistage-docker,Using a multi-stage Docker build>> to build the native image. <4> Call `native-image` with the content of file `native-image.args` as arguments. We also supply an additional argument to limit the process's maximum memory limitation to 4 Gigabyte. In a CI/CD setup, we would: diff --git a/docs/src/main/asciidoc/platform.adoc b/docs/src/main/asciidoc/platform.adoc index bf76aed81c168..be07e57b2e146 100644 --- a/docs/src/main/asciidoc/platform.adoc +++ b/docs/src/main/asciidoc/platform.adoc @@ -124,9 +124,9 @@ public class NativeConfig { In this case the default value for `quarkus.native.builder-image` will be provided by the platform. The user will still be able to set the desired value for `quarkus.native.builder-image` in its `application.properties`, of course. But in case it's not customized by the user, the default value will be coming from the platform properties. A platform properties file for the example above would contain (the actual value is provided as an example): -[source,text] +[source,text,subs=attributes+] ---- -platform.quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.1.0-java11 +platform.quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor} ---- There is also a Maven plugin goal that validates the platform properties content and its artifact coordinates and also checks whether the platform properties artifact is present in the platform's BOM. Here is a sample plugin configuration: diff --git a/independent-projects/bootstrap/bom/pom.xml b/independent-projects/bootstrap/bom/pom.xml index 4969e4a04ea84..6d4dd3788f964 100644 --- a/independent-projects/bootstrap/bom/pom.xml +++ b/independent-projects/bootstrap/bom/pom.xml @@ -35,7 +35,7 @@ 1.0.9 1.1.0.Final 1.7.30 - 21.1.0 + 21.2.0 2.6.0 3.0.0-M5 1.6.0