Skip to content

Commit 5386948

Browse files
committed
Update to Java 21 for releases
We've been using it for tests for a while already (#657). Into the future /o/ Signed-off-by: Matthias Rampke <matthias@prometheus.io>
1 parent d977766 commit 5386948

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Set up JDK 17
22+
- name: Set up JDK 21
2323
uses: actions/setup-java@v4
2424
with:
25-
java-version: '17'
25+
java-version: '21'
2626
distribution: 'temurin'
2727
cache: maven
2828
- name: test
@@ -32,4 +32,4 @@ jobs:
3232

3333
# Upload the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3434
- name: Update dependency graph
35-
uses: advanced-security/maven-dependency-submission-action@v4.1.1 # Downgraded from 4.0.1 due to https://github.com/advanced-security/maven-dependency-submission-action/issues/65
35+
uses: advanced-security/maven-dependency-submission-action@v4.1.1

Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:17-jdk-focal as builder
1+
FROM eclipse-temurin:21-jdk-noble as builder
22

33
SHELL ["/bin/bash", "-xe", "-o", "pipefail", "-c"]
44

@@ -14,14 +14,10 @@ ENV PATH /opt/maven/bin:${PATH}
1414
WORKDIR /cloudwatch_exporter
1515
COPY . /cloudwatch_exporter
1616

17-
# As of Java 13, the default is POSIX_SPAWN, which doesn't seem to work on
18-
# ARM64: https://github.com/openzipkin/docker-java/issues/34#issuecomment-721673618
19-
ENV MAVEN_OPTS "-Djdk.lang.Process.launchMechanism=vfork"
20-
2117
RUN mvn package \
2218
&& mv target/cloudwatch_exporter-*-with-dependencies.jar /cloudwatch_exporter.jar
2319

24-
FROM eclipse-temurin:17-jre-focal as runner
20+
FROM eclipse-temurin:21-jre-noble as runner
2521
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
2622
EXPOSE 9106
2723

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The process is based on the [`java_client` release process](https://github.com/p
55

66
## Requirements
77

8-
* JDK 17
8+
* [Temurin JDK 21](https://adoptium.net/)
99
* Maven
1010
* GPG
1111

0 commit comments

Comments
 (0)