From 69dc8fe6541d0985aa78c7b4f1f301050321e7f4 Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Wed, 16 Oct 2024 10:06:28 -0400 Subject: [PATCH 1/2] Remove Java 17 Java 17 now requires paid support & thus requires a download through the Oracle Technology Network. The buildpack does not support downloading through OTN, so we are dropping this version. Users will need to update to Java 21 or pick a different Java vendor that provides publically accessible downloads. Signed-off-by: Daniel Mikusa --- .github/pipeline-descriptor.yml | 34 ------ .github/workflows/pb-update-jdk-17-arm-64.yml | 105 ------------------ .github/workflows/pb-update-jdk-17.yml | 104 ----------------- .../pb-update-native-image-17-arm-64.yml | 105 ------------------ .../workflows/pb-update-native-image-17.yml | 104 ----------------- README.md | 42 +++---- buildpack.toml | 60 +--------- 7 files changed, 23 insertions(+), 531 deletions(-) delete mode 100644 .github/workflows/pb-update-jdk-17-arm-64.yml delete mode 100644 .github/workflows/pb-update-jdk-17.yml delete mode 100644 .github/workflows/pb-update-native-image-17-arm-64.yml delete mode 100644 .github/workflows/pb-update-native-image-17.yml diff --git a/.github/pipeline-descriptor.yml b/.github/pipeline-descriptor.yml index 2155cad..ac24dfb 100644 --- a/.github/pipeline-descriptor.yml +++ b/.github/pipeline-descriptor.yml @@ -24,14 +24,6 @@ docker_credentials: password: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} dependencies: - - name: JDK 17 - id: jdk - version_pattern: "17\\.[\\d]+\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - type: jdk - version: "17" - distro: oracle - name: JDK 21 id: jdk version_pattern: "21\\.[\\d]+\\.[\\d]+" @@ -48,14 +40,6 @@ dependencies: type: jdk version: "23" distro: oracle - - name: Native Image 17 - id: native-image-svm - version_pattern: "17\\.[\\d]+\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - type: jdk - version: "17" - distro: graalvm - name: Native Image 21 id: native-image-svm version_pattern: "21\\.[\\d]+\\.[\\d]+" @@ -74,15 +58,6 @@ dependencies: distro: graalvm # ARM64 - - name: JDK 17 ARM64 - id: jdk - version_pattern: "17\\.[\\d]+\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - type: jdk - version: "17" - distro: oracle - arch: "arm64" - name: JDK 21 ARM64 id: jdk version_pattern: "21\\.[\\d]+\\.[\\d]+" @@ -101,15 +76,6 @@ dependencies: version: "23" distro: oracle arch: "arm64" - - name: Native Image 17 ARM64 - id: native-image-svm - version_pattern: "17\\.[\\d]+\\.[\\d]+" - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - type: jdk - version: "17" - distro: graalvm - arch: "arm64" - name: Native Image 21 ARM64 id: native-image-svm version_pattern: "21\\.[\\d]+\\.[\\d]+" diff --git a/.github/workflows/pb-update-jdk-17-arm-64.yml b/.github/workflows/pb-update-jdk-17-arm-64.yml deleted file mode 100644 index f6669b0..0000000 --- a/.github/workflows/pb-update-jdk-17-arm-64.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Update JDK 17 ARM64 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.7.2 - with: - crane-version: 0.19.1 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - arch: arm64 - distro: oracle - type: jdk - version: "17" - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: arm64 - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: jdk - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 17\.[\d]+\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `JDK 17 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jdk-17-arm-64 - commit-message: |- - Bump JDK 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps JDK 17 ARM64 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 17 ARM64 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-jdk-17.yml b/.github/workflows/pb-update-jdk-17.yml deleted file mode 100644 index 5c2112c..0000000 --- a/.github/workflows/pb-update-jdk-17.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Update JDK 17 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.7.2 - with: - crane-version: 0.19.1 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - distro: oracle - type: jdk - version: "17" - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: "" - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: jdk - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 17\.[\d]+\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `JDK 17` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jdk-17 - commit-message: |- - Bump JDK 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps JDK 17 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 17 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-native-image-17-arm-64.yml b/.github/workflows/pb-update-native-image-17-arm-64.yml deleted file mode 100644 index a00fc94..0000000 --- a/.github/workflows/pb-update-native-image-17-arm-64.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Update Native Image 17 ARM64 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.7.2 - with: - crane-version: 0.19.1 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - arch: arm64 - distro: graalvm - type: jdk - version: "17" - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: arm64 - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: native-image-svm - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 17\.[\d]+\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `Native Image 17 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/native-image-17-arm-64 - commit-message: |- - Bump Native Image 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps Native Image 17 ARM64 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 Native Image 17 ARM64 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-native-image-17.yml b/.github/workflows/pb-update-native-image-17.yml deleted file mode 100644 index 80bd8d1..0000000 --- a/.github/workflows/pb-update-native-image-17.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Update Native Image 17 -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Buildpack Dependency - runs-on: - - ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - - name: Install update-buildpack-dependency - run: | - #!/usr/bin/env bash - - set -euo pipefail - - go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest - - uses: buildpacks/github-actions/setup-tools@v5.7.2 - with: - crane-version: 0.19.1 - yj-version: 5.1.0 - - uses: actions/checkout@v4 - - id: dependency - uses: docker://ghcr.io/paketo-buildpacks/actions/foojay-dependency:main - with: - distro: graalvm - type: jdk - version: "17" - - name: Update Buildpack Dependency - id: buildpack - run: | - #!/usr/bin/env bash - - set -euo pipefail - - VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") - ARCH=${ARCH:-amd64} - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - - if [ -z "$OLD_VERSION" ]; then - ARCH="" # empty means noarch - OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") - fi - - update-buildpack-dependency \ - --buildpack-toml buildpack.toml \ - --id "${ID}" \ - --arch "${ARCH}" \ - --version-pattern "${VERSION_PATTERN}" \ - --version "${VERSION}" \ - --cpe-pattern "${CPE_PATTERN:-}" \ - --cpe "${CPE:-}" \ - --purl-pattern "${PURL_PATTERN:-}" \ - --purl "${PURL:-}" \ - --uri "${URI}" \ - --sha256 "${SHA256}" \ - --source "${SOURCE_URI}" \ - --source-sha256 "${SOURCE_SHA256}" - - git add buildpack.toml - git checkout -- . - - if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then - LABEL="semver:major" - elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then - LABEL="semver:minor" - else - LABEL="semver:patch" - fi - - echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" - echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" - env: - ARCH: "" - CPE: ${{ steps.dependency.outputs.cpe }} - CPE_PATTERN: "" - ID: native-image-svm - PURL: ${{ steps.dependency.outputs.purl }} - PURL_PATTERN: "" - SHA256: ${{ steps.dependency.outputs.sha256 }} - SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} - SOURCE_URI: ${{ steps.dependency.outputs.source }} - URI: ${{ steps.dependency.outputs.uri }} - VERSION: ${{ steps.dependency.outputs.version }} - VERSION_PATTERN: 17\.[\d]+\.[\d]+ - - uses: peter-evans/create-pull-request@v6 - with: - author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> - body: Bumps `Native Image 17` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/native-image-17 - commit-message: |- - Bump Native Image 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps Native Image 17 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 Native Image 17 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 18b308e..b45b955 100644 --- a/README.md +++ b/README.md @@ -48,27 +48,27 @@ The buildpack will do the following if a JRE is requested: ## Configuration -| Environment Variable | Description | -| ----------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `$BP_JVM_VERSION` | Configure the JVM version (e.g. `17`, `21`, `22`). 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_JVM_CLASS_ADJUSTMENT` | Absolute or percentage based adjustment of the memory calculator's class count, which influences various memory settings of the JVM. This is useful when the number of classes cannot be reliably determined during build-time and workloads run into OOM situations. Defaults to `100%`. | -| `$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. `21`, `23`). 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_JVM_CLASS_ADJUSTMENT` | Absolute or percentage based adjustment of the memory calculator's class count, which influences various memory settings of the JVM. This is useful when the number of classes cannot be reliably determined during build-time and workloads run into OOM situations. Defaults to `100%`. | +| `$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/oracle/releases diff --git a/buildpack.toml b/buildpack.toml index ba64a41..b90917d 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -123,7 +123,7 @@ api = "0.7" [[metadata.configurations]] build = true - default = "17" + default = "21" description = "the Java version" name = "BP_JVM_VERSION" @@ -139,21 +139,7 @@ api = "0.7" name = "JAVA_TOOL_OPTIONS" [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:17.0.12:*:*:*:*:*:*:*"] - id = "jdk" - name = "Oracle JDK" - purl = "pkg:generic/oracle-jdk@17.0.12?arch=amd64" - sha256 = "311f1448312ecab391fe2a1b2ac140d6e1c7aea6fbf08416b466a58874f2b40f" - stacks = ["*"] - uri = "https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-x64_bin.tar.gz" - version = "17.0.12" - - [[metadata.dependencies.licenses]] - type = "Oracle No-Fee Terms and Conditions License" - uri = "https://www.oracle.com/downloads/licenses/no-fee-license.html" - - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:21.0.5:*:*:*:*:*:*:*"] + cpes = ["cpe:2.3:a:oracle:jdk:21.0.4:*:*:*:*:*:*:*"] id = "jdk" name = "Oracle JDK" purl = "pkg:generic/oracle-jdk@21.0.5?arch=amd64" @@ -180,20 +166,6 @@ api = "0.7" type = "Oracle No-Fee Terms and Conditions License" uri = "https://www.oracle.com/downloads/licenses/no-fee-license.html" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:17.0.12:*:*:*:*:*:*:*:*"] - id = "native-image-svm" - name = "Oracle GraalVM" - purl = "pkg:generic/graalvm-jdk@17.0.12?arch=amd64" - sha256 = "b6f3dace24cf1960ec790216f4c86f00d4f43df64e4e8b548f6382f04894713f" - stacks = ["*"] - uri = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.12_linux-x64_bin.tar.gz" - version = "17.0.12" - - [[metadata.dependencies.licenses]] - type = "GraalVM Free Terms and Conditions License" - uri = "https://www.oracle.com/downloads/licenses/graal-free-license.html" - [[metadata.dependencies]] cpes = ["cpe:2.3:a:oracle:jdk:21.0.4:*:*:*:*:*:*:*:*"] id = "native-image-svm" @@ -222,20 +194,6 @@ api = "0.7" type = "GraalVM Free Terms and Conditions License" uri = "https://www.oracle.com/downloads/licenses/graal-free-license.html" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:17.0.12:*:*:*:*:*:*:*"] - id = "jdk" - name = "Oracle JDK" - purl = "pkg:generic/oracle-jdk@17.0.12?arch=arm64" - sha256 = "31c2fa06f3f98d92984a86269c71e6b9e956272084f3a1d2db6d07e6164b2f4f" - stacks = ["*"] - uri = "https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-aarch64_bin.tar.gz" - version = "17.0.12" - - [[metadata.dependencies.licenses]] - type = "Oracle No-Fee Terms and Conditions License" - uri = "https://www.oracle.com/downloads/licenses/no-fee-license.html" - [[metadata.dependencies]] cpes = ["cpe:2.3:a:oracle:jdk:21.0.5:*:*:*:*:*:*:*"] id = "jdk" @@ -264,20 +222,6 @@ api = "0.7" type = "Oracle No-Fee Terms and Conditions License" uri = "https://www.oracle.com/downloads/licenses/no-fee-license.html" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:17.0.12:*:*:*:*:*:*:*:*"] - id = "native-image-svm" - name = "Oracle GraalVM" - purl = "pkg:generic/graalvm-jdk@17.0.12?arch=arm64" - sha256 = "bd991d486b92deb74337b881e0f13a764c9c1e90fc358819080f7321fa5175e8" - stacks = ["*"] - uri = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.12_linux-aarch64_bin.tar.gz" - version = "17.0.12" - - [[metadata.dependencies.licenses]] - type = "GraalVM Free Terms and Conditions License" - uri = "https://www.oracle.com/downloads/licenses/graal-free-license.html" - [[metadata.dependencies]] cpes = ["cpe:2.3:a:oracle:jdk:21.0.4:*:*:*:*:*:*:*:*"] id = "native-image-svm" From d4b8ac20239591cea5ec366025c1c085f9bfbf7c Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Thu, 17 Oct 2024 07:51:14 -0400 Subject: [PATCH 2/2] Update buildpack.toml --- buildpack.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildpack.toml b/buildpack.toml index b90917d..30b607e 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -139,7 +139,7 @@ api = "0.7" name = "JAVA_TOOL_OPTIONS" [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:21.0.4:*:*:*:*:*:*:*"] + cpes = ["cpe:2.3:a:oracle:jdk:21.0.5:*:*:*:*:*:*:*"] id = "jdk" name = "Oracle JDK" purl = "pkg:generic/oracle-jdk@21.0.5?arch=amd64"