Skip to content

Commit

Permalink
Merge pull request #723 from prometheus/mr/java-21
Browse files Browse the repository at this point in the history
Update to Java 21 for releases
  • Loading branch information
matthiasr authored Aug 18, 2024
2 parents d977766 + 5386948 commit 1aa7783
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: maven
- name: test
Expand All @@ -32,4 +32,4 @@ jobs:

# Upload the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/[email protected] # Downgraded from 4.0.1 due to https://github.com/advanced-security/maven-dependency-submission-action/issues/65
uses: advanced-security/[email protected]
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jdk-focal as builder
FROM eclipse-temurin:21-jdk-noble as builder

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

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

# As of Java 13, the default is POSIX_SPAWN, which doesn't seem to work on
# ARM64: https://github.com/openzipkin/docker-java/issues/34#issuecomment-721673618
ENV MAVEN_OPTS "-Djdk.lang.Process.launchMechanism=vfork"

RUN mvn package \
&& mv target/cloudwatch_exporter-*-with-dependencies.jar /cloudwatch_exporter.jar

FROM eclipse-temurin:17-jre-focal as runner
FROM eclipse-temurin:21-jre-noble as runner
LABEL maintainer="The Prometheus Authors <[email protected]>"
EXPOSE 9106

Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The process is based on the [`java_client` release process](https://github.com/p

## Requirements

* JDK 17
* [Temurin JDK 21](https://adoptium.net/)
* Maven
* GPG

Expand Down

0 comments on commit 1aa7783

Please sign in to comment.