From 6d73a326f8f0fb4aea0103294ec74edaf8e9cc76 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Wed, 20 Sep 2023 14:26:57 -0400 Subject: [PATCH] Replace Java 20 with 21 --- .github/pipeline-descriptor.yml | 12 +++--- ...update-jdk-20.yml => pb-update-jdk-21.yml} | 16 ++++---- ...update-jre-20.yml => pb-update-jre-21.yml} | 16 ++++---- README.md | 40 +++++++++---------- buildpack.toml | 20 +++++----- 5 files changed, 52 insertions(+), 52 deletions(-) rename .github/workflows/{pb-update-jdk-20.yml => pb-update-jdk-21.yml} (91%) rename .github/workflows/{pb-update-jre-20.yml => pb-update-jre-21.yml} (91%) diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index df0eff6..6cbc404 100644 --- a/.github/pipeline-descriptor.yml +++ b/.github/pipeline-descriptor.yml @@ -64,17 +64,17 @@ dependencies: with: type: jre version: "17" -- name: JDK 20 +- name: JDK 21 id: jdk - version_pattern: "20\\.[\\d]+\\.[\\d]+" + version_pattern: "21\\.[\\d]+\\.[\\d]+" uses: docker://ghcr.io/paketo-buildpacks/actions/azul-zulu-dependency:main with: type: jdk - version: "20" -- name: JRE 20 + version: "21" +- name: JRE 21 id: jre - version_pattern: "20\\.[\\d]+\\.[\\d]+" + version_pattern: "21\\.[\\d]+\\.[\\d]+" uses: docker://ghcr.io/paketo-buildpacks/actions/azul-zulu-dependency:main with: type: jre - version: "20" + version: "21" diff --git a/.github/workflows/pb-update-jdk-20.yml b/.github/workflows/pb-update-jdk-21.yml similarity index 91% rename from .github/workflows/pb-update-jdk-20.yml rename to .github/workflows/pb-update-jdk-21.yml index d308ec7..985e1a6 100644 --- a/.github/workflows/pb-update-jdk-20.yml +++ b/.github/workflows/pb-update-jdk-21.yml @@ -1,4 +1,4 @@ -name: Update JDK 20 +name: Update JDK 21 "on": schedule: - cron: 0 5 * * 1-5 @@ -45,7 +45,7 @@ jobs: uses: docker://ghcr.io/paketo-buildpacks/actions/azul-zulu-dependency:main with: type: jdk - version: "20" + version: "21" - name: Update Buildpack Dependency id: buildpack run: | @@ -94,18 +94,18 @@ jobs: SHA256: ${{ steps.dependency.outputs.sha256 }} URI: ${{ steps.dependency.outputs.uri }} VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 20\.[\d]+\.[\d]+ + VERSION_PATTERN: 21\.[\d]+\.[\d]+ - uses: peter-evans/create-pull-request@v5 with: author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `JDK 20` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jdk-20 + body: Bumps `JDK 21` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. + branch: update/buildpack/jdk-21 commit-message: |- - Bump JDK 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} + Bump JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - Bumps JDK 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. + Bumps JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. delete-branch: true labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade signoff: true - title: Bump JDK 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} + title: Bump JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/pb-update-jre-20.yml b/.github/workflows/pb-update-jre-21.yml similarity index 91% rename from .github/workflows/pb-update-jre-20.yml rename to .github/workflows/pb-update-jre-21.yml index 1a358eb..b8d8b41 100644 --- a/.github/workflows/pb-update-jre-20.yml +++ b/.github/workflows/pb-update-jre-21.yml @@ -1,4 +1,4 @@ -name: Update JRE 20 +name: Update JRE 21 "on": schedule: - cron: 0 5 * * 1-5 @@ -45,7 +45,7 @@ jobs: uses: docker://ghcr.io/paketo-buildpacks/actions/azul-zulu-dependency:main with: type: jre - version: "20" + version: "21" - name: Update Buildpack Dependency id: buildpack run: | @@ -94,18 +94,18 @@ jobs: SHA256: ${{ steps.dependency.outputs.sha256 }} URI: ${{ steps.dependency.outputs.uri }} VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 20\.[\d]+\.[\d]+ + VERSION_PATTERN: 21\.[\d]+\.[\d]+ - uses: peter-evans/create-pull-request@v5 with: author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `JRE 20` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jre-20 + body: Bumps `JRE 21` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. + branch: update/buildpack/jre-21 commit-message: |- - Bump JRE 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} + Bump JRE 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - Bumps JRE 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. + Bumps JRE 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. delete-branch: true labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade signoff: true - title: Bump JRE 20 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} + title: Bump JRE 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} diff --git a/README.md b/README.md index d982559..64ff288 100644 --- a/README.md +++ b/README.md @@ -41,26 +41,26 @@ The buildpack will do the following if a JRE is requested: ## Configuration -| Environment Variable | Description | -| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `$BP_JVM_VERSION` | Configure the JVM version (e.g. `8`, `11`, `17`). The buildpack will download JDK and JRE assets that are compatible with this version of the JVM specification. Since the buildpack only ships a single version of each supported line, updates to the buildpack can change the exact version of the JDK or JRE. In order to hold the JDK and JRE versions stable, the buildpack version itself must be stable.

Buildpack releases (and the dependency versions for each release) can be found [here][bpv]. Few users will use this buildpack directly, instead consuming a language buildpack like `paketo-buildpacks/java` who's releases (and the individual buildpack versions and dependency versions for each release) can be found [here](https://github.com/paketo-buildpacks/java/releases). Finally, some users will will consume builders like `paketobuildpacks/builder:base` who's releases can be found [here](https://hub.docker.com/r/paketobuildpacks/builder/tags?page=1&name=base). To determine the individual buildpack versions and dependency versions for each builder release use the [`pack inspect-builder `](https://buildpacks.io/docs/reference/pack/pack_inspect-builder/) functionality. | -| `$BP_JVM_TYPE` | Configure the JVM type that is provided at runtime, i.e. a JDK or JRE - accepts values "JDK" or "JRE" (default). If a JRE type is requested but not available, a JDK will be provided. | -| `$BPL_JVM_HEAD_ROOM` | Configure the percentage of headroom the memory calculator will allocated. Defaults to `0`. | -| `$BPL_JVM_LOADED_CLASS_COUNT` | Configure the number of classes that will be loaded at runtime. Defaults to 35% of the number of classes. | -| `$BPL_JVM_THREAD_COUNT` | Configure the number of user threads at runtime. Defaults to `250`. | -| `$BPL_HEAP_DUMP_PATH` | Configure the location for writing heap dumps in the event of an OutOfMemoryError exception. Defaults to ``, which disables writing heap dumps. The path set must be writable by the JVM process. | -| `$BPL_JAVA_NMT_ENABLED` | Configure whether Java Native Memory Tracking (NMT) is enabled. Defaults to `true`. Set this to `false` to disable NMT functionality. | -| `$BPL_JAVA_NMT_LEVEL` | Configure the level of detail for Java Native Memory Tracking (NMT) output. Defaults to `summary`. Set this to `detail` for detailed NMT output. | -| `$BPL_JMX_ENABLED` | Configure whether Java Management Extensions (JMX) is enabled. Defaults to `false`. Set this to `true` to enable JMX functionality. | -| `$BPL_JMX_PORT` | Configure the port number for JMX. Defaults to `5000`. When running the container, this value should match the port published locally, i.e. for Docker: --publish 5000:5000 | -| `$BPL_DEBUG_ENABLED` | Configure whether remote debugging features are enabled. Defaults to `false`. Set this to `true` to enable remote debugging. | -| `$BPL_DEBUG_PORT` | Configure the port number for remote debugging. Defaults to `8000`. -| `$BPL_DEBUG_SUSPEND` | Configure whether to suspend execution until a debugger has attached. Defaults to `false`. -| `$BPL_JFR_ENABLED` | Configure whether Java Flight Recording (JFR) is enabled. If no arguments are specified via `BPL_JFR_ARGS`, the default config args `dumponexit=true,filename=/tmp/recording.jfr` are added. -| `$BPL_JFR_ARGS` | Configure custom arguments to Java Flight Recording, via a comma-separated list, e.g. `duration=10s,maxage=1m`. If any values are specified, no default args are supplied. -| `$BP_JVM_JLINK_ENABLED` | Configures whether to run the JDK's jlink tool at build time to generate a custom JRE. Defaults to `false`. If no custom args are specified, the default args are `--no-man-pages --no-header-files --strip-debug --compress=1`. -| `$BP_JVM_JLINK_ARGS` | Configure custom arguments to supply to the jlink tool. If any custom args are specified, no default args are supplied. -| `$JAVA_TOOL_OPTIONS` | Configure the JVM launch flags | +| Environment Variable | Description | +| ----------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `$BP_JVM_VERSION` | Configure the JVM version (e.g. `8`, `11`, `17`, `21`). The buildpack will download JDK and JRE assets that are compatible with this version of the JVM specification. Since the buildpack only ships a single version of each supported line, updates to the buildpack can change the exact version of the JDK or JRE. In order to hold the JDK and JRE versions stable, the buildpack version itself must be stable.

Buildpack releases (and the dependency versions for each release) can be found [here][bpv]. Few users will use this buildpack directly, instead consuming a language buildpack like `paketo-buildpacks/java` who's releases (and the individual buildpack versions and dependency versions for each release) can be found [here](https://github.com/paketo-buildpacks/java/releases). Finally, some users will will consume builders like `paketobuildpacks/builder:base` who's releases can be found [here](https://hub.docker.com/r/paketobuildpacks/builder/tags?page=1&name=base). To determine the individual buildpack versions and dependency versions for each builder release use the [`pack inspect-builder `](https://buildpacks.io/docs/reference/pack/pack_inspect-builder/) functionality. | +| `$BP_JVM_TYPE` | Configure the JVM type that is provided at runtime, i.e. a JDK or JRE - accepts values "JDK" or "JRE" (default). If a JRE type is requested but not available, a JDK will be provided. | +| `$BPL_JVM_HEAD_ROOM` | Configure the percentage of headroom the memory calculator will allocated. Defaults to `0`. | +| `$BPL_JVM_LOADED_CLASS_COUNT` | Configure the number of classes that will be loaded at runtime. Defaults to 35% of the number of classes. | +| `$BPL_JVM_THREAD_COUNT` | Configure the number of user threads at runtime. Defaults to `250`. | +| `$BPL_HEAP_DUMP_PATH` | Configure the location for writing heap dumps in the event of an OutOfMemoryError exception. Defaults to ``, which disables writing heap dumps. The path set must be writable by the JVM process. | +| `$BPL_JAVA_NMT_ENABLED` | Configure whether Java Native Memory Tracking (NMT) is enabled. Defaults to `true`. Set this to `false` to disable NMT functionality. | +| `$BPL_JAVA_NMT_LEVEL` | Configure the level of detail for Java Native Memory Tracking (NMT) output. Defaults to `summary`. Set this to `detail` for detailed NMT output. | +| `$BPL_JMX_ENABLED` | Configure whether Java Management Extensions (JMX) is enabled. Defaults to `false`. Set this to `true` to enable JMX functionality. | +| `$BPL_JMX_PORT` | Configure the port number for JMX. Defaults to `5000`. When running the container, this value should match the port published locally, i.e. for Docker: --publish 5000:5000 | +| `$BPL_DEBUG_ENABLED` | Configure whether remote debugging features are enabled. Defaults to `false`. Set this to `true` to enable remote debugging. | +| `$BPL_DEBUG_PORT` | Configure the port number for remote debugging. Defaults to `8000`. +| `$BPL_DEBUG_SUSPEND` | Configure whether to suspend execution until a debugger has attached. Defaults to `false`. +| `$BPL_JFR_ENABLED` | Configure whether Java Flight Recording (JFR) is enabled. If no arguments are specified via `BPL_JFR_ARGS`, the default config args `dumponexit=true,filename=/tmp/recording.jfr` are added. +| `$BPL_JFR_ARGS` | Configure custom arguments to Java Flight Recording, via a comma-separated list, e.g. `duration=10s,maxage=1m`. If any values are specified, no default args are supplied. +| `$BP_JVM_JLINK_ENABLED` | Configures whether to run the JDK's jlink tool at build time to generate a custom JRE. Defaults to `false`. If no custom args are specified, the default args are `--no-man-pages --no-header-files --strip-debug --compress=1`. +| `$BP_JVM_JLINK_ARGS` | Configure custom arguments to supply to the jlink tool. If any custom args are specified, no default args are supplied. +| `$JAVA_TOOL_OPTIONS` | Configure the JVM launch flags | [bpv]: https://github.com/paketo-buildpacks/azul-zulu/releases diff --git a/buildpack.toml b/buildpack.toml index bf77d64..6473083 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -223,28 +223,28 @@ api = "0.7" uri = "https://openjdk.java.net/legal/gplv2+ce.html" [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:20.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:azul:zulu:20.0.2:*:*:*:*:*:*:*"] + cpes = ["cpe:2.3:a:oracle:jdk:21.0.0:*:*:*:*:*:*:*", "cpe:2.3:a:azul:zulu:21.0.0:*:*:*:*:*:*:*"] id = "jdk" name = "Azul Zulu JDK" - purl = "pkg:generic/azul-zulu-jdk@20.0.2?arch=amd64" - sha256 = "b2af442a137ac3a632278bcf5d14a521fe946c353f2dfb32875e72bc16e6323a" + purl = "pkg:generic/azul-zulu-jdk@21.0.0?arch=amd64" + sha256 = "0c0eadfbdc47a7ca64aeab51b9c061f71b6e4d25d2d87674512e9b6387e9e3a6" stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] - uri = "https://cdn.azul.com/zulu/bin/zulu20.32.11-ca-jdk20.0.2-linux_x64.tar.gz" - version = "20.0.2" + uri = "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz" + version = "21.0.0" [[metadata.dependencies.licenses]] type = "GPL-2.0 WITH Classpath-exception-2.0" uri = "https://openjdk.java.net/legal/gplv2+ce.html" [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jre:20.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:azul:zulu:20.0.2:*:*:*:*:*:*:*"] + cpes = ["cpe:2.3:a:oracle:jre:21.0.0:*:*:*:*:*:*:*", "cpe:2.3:a:azul:zulu:21.0.0:*:*:*:*:*:*:*"] id = "jre" name = "Azul Zulu JRE" - purl = "pkg:generic/azul-zulu-jre@20.0.2?arch=amd64" - sha256 = "470b26cc65378b3955f9e3e8aee6c2579d92284c0a62580776f499496bf01d28" + purl = "pkg:generic/azul-zulu-jre@21.0.0?arch=amd64" + sha256 = "283ed539e0fb8ae9b53de3e949e7d7e29100c05d1128a5b280b10aef44591430" stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"] - uri = "https://cdn.azul.com/zulu/bin/zulu20.32.11-ca-jre20.0.2-linux_x64.tar.gz" - version = "20.0.2" + uri = "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jre21.0.0-linux_x64.tar.gz" + version = "21.0.0" [[metadata.dependencies.licenses]] type = "GPL-2.0 WITH Classpath-exception-2.0"