Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update to kotlin 1.9.23 #142

Merged
merged 4 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 7 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
]
}
],
"@semantic-release/github"
[
"@semantic-release/github",
{
"successComment": false,
"releasedLabels": false
}
]
]
}
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.12
mem_reservation: 256M
mem_limit: 512M
volumes:
Expand Down Expand Up @@ -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.12.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.12.jar --exporter.input-path="/data/app.jar" --exporter.include-filters="de.idealo.*"
```

## Building from source
Expand All @@ -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.12.jar
```

### Docker Image
Expand All @@ -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.12`.

### 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.12-native`.

## Known limitations

Expand Down
74 changes: 26 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>de.idealo.security</groupId>
<artifactId>spring-endpoint-exporter</artifactId>
<version>1.0.11</version>
<version>1.0.12-next.1</version>

<licenses>
<license>
Expand All @@ -35,7 +35,7 @@
<image.name>ghcr.io/idealo/${project.artifactId}:${project.version}</image.name>

<kotlin.code.style>official</kotlin.code.style>
<kotlin.version>1.8.22</kotlin.version>
<kotlin.version>1.9.23</kotlin.version>
<java.version>17</java.version>

<asm.version>9.7</asm.version>
Expand Down Expand Up @@ -125,9 +125,10 @@
<configuration>
<image>
<name>${image.name}</name>
<builder>paketobuildpacks/builder-jammy-tiny:latest</builder>
<builder>paketobuildpacks/builder-jammy-tiny:0.0.239</builder>
<env>
<BP_OCI_SOURCE>${project.scm.url}</BP_OCI_SOURCE>
<BP_JVM_VERSION>21</BP_JVM_VERSION> <!-- required so that GraalVM 21 is used -->
</env>
</image>
</configuration>
Expand All @@ -140,47 +141,6 @@
</build>

<profiles>
<profile>
<id>sonar-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>agent-for-ut</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>agent-for-it</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>default-report-ut</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-report-it</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
</executions>
<configuration>
<append>true</append>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish-ghcr</id>
<build>
Expand Down Expand Up @@ -212,10 +172,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand All @@ -227,6 +183,27 @@
</image>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>nativeTest</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs combine.children="append">
<!-- Workaround for https://github.com/oracle/graal/issues/6957 -->
<arg>--strict-image-heap</arg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand All @@ -239,6 +216,7 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<!-- Might be obsolete soon as https://github.com/paketo-buildpacks/native-image/releases/tag/v5.13.0 introduced arm support -->
<builder>dashaun/builder:tiny</builder>
</image>
</configuration>
Expand Down