From 245f56e1e08abf5232034fb652d7da0337a46079 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Fri, 10 Jan 2025 10:33:22 +0100 Subject: [PATCH] Remove SAPMachine 11 --- .github/workflows/pb-update-jdk-11-arm-64.yml | 108 ------------------ .github/workflows/pb-update-jdk-11.yml | 107 ----------------- README.md | 2 +- buildpack.toml | 68 ----------- 4 files changed, 1 insertion(+), 284 deletions(-) delete mode 100644 .github/workflows/pb-update-jdk-11-arm-64.yml delete mode 100644 .github/workflows/pb-update-jdk-11.yml diff --git a/.github/workflows/pb-update-jdk-11-arm-64.yml b/.github/workflows/pb-update-jdk-11-arm-64.yml deleted file mode 100644 index 2eb6430..0000000 --- a/.github/workflows/pb-update-jdk-11-arm-64.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Update JDK 11 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/github-release-dependency:main - with: - arch: arm64 - glob: sapmachine-jdk-.+_linux-aarch64_bin.tar.gz - latest_by_creation_time: true - owner: SAP - repository: SapMachine - tag_filter: sapmachine-(11.*) - token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - - 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: 11\.[\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 11 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jdk-11-arm-64 - commit-message: |- - Bump JDK 11 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps JDK 11 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 11 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-11.yml b/.github/workflows/pb-update-jdk-11.yml deleted file mode 100644 index 7cfe429..0000000 --- a/.github/workflows/pb-update-jdk-11.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: Update JDK 11 -"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/github-release-dependency:main - with: - glob: sapmachine-jdk-.+_linux-x64_bin.tar.gz - latest_by_creation_time: true - owner: SAP - repository: SapMachine - tag_filter: sapmachine-(11.*) - token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - - 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: 11\.[\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 11` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. - branch: update/buildpack/jdk-11 - commit-message: |- - Bump JDK 11 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} - - Bumps JDK 11 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 11 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 c8a7514..b9c6a6f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The buildpack will do the following if a JRE is requested: | Environment Variable | Description | | ----------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `$BP_JVM_VERSION` | Configure the JVM version (e.g. `11`, `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 consume builders like `paketobuildpacks/builder:base` whose 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_VERSION` | Configure the JVM version (e.g. `17`, `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 consume builders like `paketobuildpacks/builder:base` whose 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. | diff --git a/buildpack.toml b/buildpack.toml index 0f6ec99..0a81148 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -138,40 +138,6 @@ api = "0.7" launch = true name = "JAVA_TOOL_OPTIONS" - [[metadata.dependencies]] - cpes = ["cpe:2.3:a:oracle:jdk:11.0.25:*:*:*:*:*:*:*"] - deprecation_date = "2024-12-30T00:00:00Z" - id = "jdk" - name = "SapMachine JDK" - purl = "pkg:generic/sap-machine-jdk@11.0.25?arch=amd64" - sha256 = "f11e4968a1077afa848393003a024850a013d21dc6340a03bba581ef5c12e27e" - source = "https://github.com/SAP/SapMachine/archive/refs/tags/sapmachine-11.0.25.tar.gz" - source-sha256 = "23078f3a4307755cc87dc9561ba6f30588b9e87d8862e6881eb49b6cbe21edeb" - stacks = ["*"] - uri = "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.25/sapmachine-jdk-11.0.25_linux-x64_bin.tar.gz" - version = "11.0.25" - - [[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:11.0.25:*:*:*:*:*:*:*"] - deprecation_date = "2024-12-30T00:00:00Z" - id = "jre" - name = "SapMachine JRE" - purl = "pkg:generic/sap-machine-jre@11.0.25?arch=amd64" - sha256 = "10f3eb5b93c2c26f7c69a3690d5877b401b5ab24a6b1798fac5518beb1f1f839" - source = "https://github.com/SAP/SapMachine/archive/refs/tags/sapmachine-11.0.25.tar.gz" - source-sha256 = "23078f3a4307755cc87dc9561ba6f30588b9e87d8862e6881eb49b6cbe21edeb" - stacks = ["*"] - uri = "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.25/sapmachine-jre-11.0.25_linux-x64_bin.tar.gz" - version = "11.0.25" - - [[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:jdk:17.0.13:*:*:*:*:*:*:*"] deprecation_date = "2026-09-30T00:00:00Z" @@ -274,40 +240,6 @@ api = "0.7" 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:jdk:11.0.25:*:*:*:*:*:*:*"] - deprecation_date = "2024-12-30T00:00:00Z" - id = "jdk" - name = "SapMachine JDK" - purl = "pkg:generic/sap-machine-jdk@11.0.25?arch=arm64" - sha256 = "178772ea016d02108cc69aff37086909e7b62477f3df80779bcca0c13e4c42e4" - source = "https://github.com/SAP/SapMachine/archive/refs/tags/sapmachine-11.0.25.tar.gz" - source-sha256 = "23078f3a4307755cc87dc9561ba6f30588b9e87d8862e6881eb49b6cbe21edeb" - stacks = ["*"] - uri = "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.25/sapmachine-jdk-11.0.25_linux-aarch64_bin.tar.gz" - version = "11.0.25" - - [[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:11.0.25:*:*:*:*:*:*:*"] - deprecation_date = "2024-12-30T00:00:00Z" - id = "jre" - name = "SapMachine JRE" - purl = "pkg:generic/sap-machine-jre@11.0.25?arch=arm64" - sha256 = "24d43105becc268df8c97991dd4c87d02866b0cfffca012316a022d68c0446f4" - source = "https://github.com/SAP/SapMachine/archive/refs/tags/sapmachine-11.0.25.tar.gz" - source-sha256 = "23078f3a4307755cc87dc9561ba6f30588b9e87d8862e6881eb49b6cbe21edeb" - stacks = ["*"] - uri = "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.25/sapmachine-jre-11.0.25_linux-aarch64_bin.tar.gz" - version = "11.0.25" - - [[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:jdk:17.0.13:*:*:*:*:*:*:*"] deprecation_date = "2026-09-30T00:00:00Z"