Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM64 Support #396

Merged
merged 8 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/pipeline-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ codeowners:
- path: "*"
owner: "@paketo-buildpacks/java-maintainers"

helpers:
"bin/helper": "github.com/paketo-buildpacks/libjvm/cmd/helper"

package:
repositories: ["docker.io/paketobuildpacks/eclipse-openj9", "gcr.io/paketo-buildpacks/eclipse-openj9"]
register: true
Expand Down Expand Up @@ -108,3 +111,100 @@ dependencies:
repository: semeru21-binaries
tag_filter: jdk(.*21.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
# ARM64
- name: JDK 8 ARM64
id: jdk
version_pattern: "^8(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru8-binaries
tag_filter: jdk(.*8.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JRE 8 ARM64
id: jre
version_pattern: "^8(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jre_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru8-binaries
tag_filter: jdk(.*8.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JDK 11 ARM64
id: jdk
version_pattern: "^11(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru11-binaries
tag_filter: jdk(.*11.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JRE 11 ARM64
id: jre
version_pattern: "^11(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jre_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru11-binaries
tag_filter: jdk(.*11.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JDK 17 ARM64
id: jdk
version_pattern: "^17(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru17-binaries
tag_filter: jdk(.*17.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JRE 17 ARM64
id: jre
version_pattern: "^17(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jre_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru17-binaries
tag_filter: jdk(.*17.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JDK 21 ARM64
id: jdk
version_pattern: "^21(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru21-binaries
tag_filter: jdk(.*21.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
- name: JRE 21 ARM64
id: jre
version_pattern: "^21(?:\\.[\\d]+(?:\\.[\\d]+)?)?"
cpe_pattern: "[\\d]+\\.[\\d]+\\.[\\d]+"
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
glob: ibm-semeru-open-jre_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru21-binaries
tag_filter: jdk(.*21.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
arch: arm64
2 changes: 1 addition & 1 deletion .github/workflows/pb-create-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
else
pack -v buildpack package \
"${PACKAGE}:${VERSION}" ${CONFIG} \
--format "${FORMAT}"
--format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish")
fi
env:
PACKAGES: docker.io/paketobuildpacks/eclipse-openj9 gcr.io/paketo-buildpacks/eclipse-openj9
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ jobs:
else
pack -v buildpack package \
"${PACKAGE}:${VERSION}" ${CONFIG} \
--format "${FORMAT}"
--format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish")
fi
env:
FORMAT: image
PACKAGES: test
TTL_SH_PUBLISH: "false"
VERSION: ${{ steps.version.outputs.version }}
unit:
name: Unit Test
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/pb-update-jdk-11-arm-64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
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.20"
- 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.5.3
with:
crane-version: 0.19.0
yj-version: 5.1.0
- uses: actions/checkout@v4
- id: dependency
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
arch: arm64
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru11-binaries
tag_filter: jdk(.*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: '[\d]+\.[\d]+\.[\d]+'
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 }}
107 changes: 107 additions & 0 deletions .github/workflows/pb-update-jdk-17-arm-64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
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.20"
- 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.5.3
with:
crane-version: 0.19.0
yj-version: 5.1.0
- uses: actions/checkout@v4
- id: dependency
uses: docker://ghcr.io/paketo-buildpacks/actions/ibm-semeru-dependency:main
with:
arch: arm64
glob: ibm-semeru-open-jdk_aarch64_linux_.+_openj9-.+.tar.gz
owner: ibmruntimes
repository: semeru17-binaries
tag_filter: jdk(.*17.*)
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: '[\d]+\.[\d]+\.[\d]+'
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 }}
Loading
Loading