From c72580ef234600a11167b9ecf77858acd58a80cd Mon Sep 17 00:00:00 2001 From: Tommy Schmidt Date: Sun, 31 Mar 2024 03:07:13 +0200 Subject: [PATCH] fix: update to kotlin 1.9.21 (#127) Java 21 is now used when building the native image --- .editorconfig | 2 +- .github/workflows/build.yml | 5 +-- .github/workflows/pull-request.yml | 3 +- README.md | 16 ++++--- pom.xml | 72 +++++++++++------------------- 5 files changed, 39 insertions(+), 59 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2cad30f..5593bf6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,5 +17,5 @@ ij_kotlin_field_annotation_wrap = split_into_lines ij_kotlin_method_annotation_wrap = split_into_lines ij_kotlin_variable_annotation_wrap = split_into_lines -[{*.yaml, *.yml, *.md}] +[{*.yaml,*.yml,*.md}] indent_size = 2 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a569d3a..ee7d76d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: cache: maven - name: Run Tests - run: mvn -B -ntp -Psonar-coverage verify + run: mvn -B -ntp verify verify-native: strategy: @@ -56,9 +56,8 @@ jobs: - uses: graalvm/setup-graalvm@v1 with: - java-version: '17' + java-version: '21' distribution: 'graalvm-community' - components: 'native-image' - name: Run tests run: mvn -B -ntp -PnativeTest verify diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e4e5286..7fd1541 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -43,9 +43,8 @@ jobs: - uses: graalvm/setup-graalvm@v1 with: - java-version: '17' + java-version: '21' distribution: 'graalvm-community' - components: 'native-image' - name: Run tests run: mvn -B -ntp -PnativeTest verify diff --git a/README.md b/README.md index a86bc5a..a87f0cc 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Find the latest docker image [here](https://github.com/idealo/spring-endpoint-ex ```yaml services: spring-endpoint-exporter: - image: ghcr.io/idealo/spring-endpoint-exporter:1.0.10 + image: ghcr.io/idealo/spring-endpoint-exporter:1.0.11 mem_reservation: 256M mem_limit: 512M volumes: @@ -57,13 +57,13 @@ You can pass properties to the application using environment variables or comman ``` export EXPORTER_INPUT_PATH=/data/app.jar -java -jar ./spring-endpoint-exporter-1.0.10.jar +java -jar ./spring-endpoint-exporter-1.0.11.jar ``` or ``` -java -jar ./spring-endpoint-exporter-1.0.10.jar --exporter.input-path="/data/app.jar" --exporter.include-filters="de.idealo.*" +java -jar ./spring-endpoint-exporter-1.0.11.jar --exporter.input-path="/data/app.jar" --exporter.include-filters="de.idealo.*" ``` ## Building from source @@ -79,7 +79,7 @@ Simply run the following command: You can now run the application using: ``` -java -jar ./target/spring-endpoint-exporter-1.0.10.jar +java -jar ./target/spring-endpoint-exporter-1.0.11.jar ``` ### Docker Image @@ -90,17 +90,21 @@ Make sure your docker daemon is running and run the following command: ./mvnw clean spring-boot:build-image ``` -The resulting image is named `ghcr.io/idealo/spring-endpoint-exporter:1.0.10`. +The resulting image is named `ghcr.io/idealo/spring-endpoint-exporter:1.0.11`. ### Native Docker Image (Beta) +| ⓘ Note | +|:---------------------------------------------------------------------------| +| The native image is currently only compatible with the `x86` architecture. | + Make sure your docker daemon is running and run the following command: ``` ./mvnw -Pnative clean spring-boot:build-image ``` -The resulting native image is named `ghcr.io/idealo/spring-endpoint-exporter:1.0.10-native`. +The resulting native image is named `ghcr.io/idealo/spring-endpoint-exporter:1.0.11-native`. ## Known limitations diff --git a/pom.xml b/pom.xml index 44fd98a..428b76b 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ ghcr.io/idealo/${project.artifactId}:${project.version} official - 1.8.22 + 1.9.23 17 9.7 @@ -125,9 +125,10 @@ ${image.name} - paketobuildpacks/builder-jammy-tiny:latest + paketobuildpacks/builder-jammy-tiny:0.0.239 ${project.scm.url} + 21 @@ -140,47 +141,6 @@ - - sonar-coverage - - - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - agent-for-ut - - prepare-agent - - - - agent-for-it - - prepare-agent-integration - - - - default-report-ut - - report - - - - default-report-it - - report-integration - - - - - true - - - - - publish-ghcr @@ -212,10 +172,6 @@ - - org.graalvm.buildtools - native-maven-plugin - org.springframework.boot spring-boot-maven-plugin @@ -227,6 +183,27 @@ + + org.graalvm.buildtools + native-maven-plugin + + + + + + nativeTest + + + + org.graalvm.buildtools + native-maven-plugin + + + + --strict-image-heap + + + @@ -239,6 +216,7 @@ spring-boot-maven-plugin + dashaun/builder:tiny