├── .github
├── CODEOWNERS
├── dependabot.yml
├── labels.yml
├── pipeline-descriptor.yml
├── pipeline-version
├── release-drafter.yml
└── workflows
│ ├── pb-create-package.yml
│ ├── pb-minimal-labels.yml
│ ├── pb-synchronize-labels.yml
│ ├── pb-tests.yml
│ ├── pb-update-draft-release.yml
│ ├── pb-update-go.yml
│ ├── pb-update-jdk-17-arm-64.yml
│ ├── pb-update-jdk-17.yml
│ ├── pb-update-jdk-21-arm-64.yml
│ ├── pb-update-jdk-21.yml
│ ├── pb-update-jdk-24-arm-64.yml
│ ├── pb-update-jdk-24.yml
│ ├── pb-update-native-image-17-arm-64.yml
│ ├── pb-update-native-image-17.yml
│ ├── pb-update-native-image-21-arm-64.yml
│ ├── pb-update-native-image-21.yml
│ ├── pb-update-native-image-24-arm-64.yml
│ ├── pb-update-native-image-24.yml
│ └── pb-update-pipeline.yml
├── .gitignore
├── LICENSE
├── NOTICE
├── README.md
├── buildpack.toml
├── cmd
└── main
│ └── main.go
├── go.mod
├── go.sum
└── scripts
├── build.sh
└── update-buildpack-dependency.sh
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @paketo-buildpacks/java-maintainers
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: gomod
4 | directory: /
5 | schedule:
6 | interval: daily
7 | ignore:
8 | - dependency-name: github.com/onsi/gomega
9 | labels:
10 | - semver:patch
11 | - type:dependency-upgrade
12 |
--------------------------------------------------------------------------------
/.github/labels.yml:
--------------------------------------------------------------------------------
1 | - name: semver:major
2 | description: A change requiring a major version bump
3 | color: f9d0c4
4 | - name: semver:minor
5 | description: A change requiring a minor version bump
6 | color: f9d0c4
7 | - name: semver:patch
8 | description: A change requiring a patch version bump
9 | color: f9d0c4
10 | - name: type:bug
11 | description: A general bug
12 | color: e3d9fc
13 | - name: type:dependency-upgrade
14 | description: A dependency upgrade
15 | color: e3d9fc
16 | - name: type:documentation
17 | description: A documentation update
18 | color: e3d9fc
19 | - name: type:enhancement
20 | description: A general enhancement
21 | color: e3d9fc
22 | - name: type:question
23 | description: A user question
24 | color: e3d9fc
25 | - name: type:task
26 | description: A general task
27 | color: e3d9fc
28 | - name: type:informational
29 | description: Provides information or notice to the community
30 | color: e3d9fc
31 | - name: type:poll
32 | description: Request for feedback from the community
33 | color: e3d9fc
34 | - name: note:ideal-for-contribution
35 | description: An issue that a contributor can help us with
36 | color: 54f7a8
37 | - name: note:on-hold
38 | description: We can't start working on this issue yet
39 | color: 54f7a8
40 | - name: note:good-first-issue
41 | description: A good first issue to get started with
42 | color: 54f7a8
43 |
--------------------------------------------------------------------------------
/.github/pipeline-descriptor.yml:
--------------------------------------------------------------------------------
1 | github:
2 | username: ${{ secrets.JAVA_GITHUB_USERNAME }}
3 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
4 |
5 | helpers:
6 | "bin/helper": "github.com/paketo-buildpacks/libjvm/cmd/helper"
7 |
8 | codeowners:
9 | - path: "*"
10 | owner: "@paketo-buildpacks/java-maintainers"
11 |
12 | package:
13 | repositories: ["docker.io/paketobuildpacks/graalvm","gcr.io/paketo-buildpacks/graalvm"]
14 | register: true
15 | registry_token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
16 |
17 | docker_credentials:
18 | - registry: gcr.io
19 | username: _json_key
20 | password: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }}
21 | - registry: docker.io
22 | username: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }}
23 | password: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }}
24 |
25 | dependencies:
26 | - name: JDK 17
27 | id: jdk
28 | version_pattern: "17\\.[\\d]+\\.[\\d]+"
29 | purl_pattern: "17\\.[\\d]+\\.[\\d]+"
30 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
31 | with:
32 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
33 | owner: graalvm
34 | repository: graalvm-ce-builds
35 | tag_filter: "^jdk-(17\\.[\\d]+\\.[\\d])$"
36 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
37 | version: 17
38 | - name: JDK 21
39 | id: jdk
40 | version_pattern: "21\\.[\\d]+\\.[\\d]+"
41 | purl_pattern: "21\\.[\\d]+\\.[\\d]+"
42 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
43 | with:
44 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
45 | owner: graalvm
46 | repository: graalvm-ce-builds
47 | tag_filter: "^jdk-(21\\.[\\d]+\\.[\\d])$"
48 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
49 | version: 21
50 | - name: JDK 24
51 | id: jdk
52 | version_pattern: "24\\.[\\d]+\\.[\\d]+"
53 | purl_pattern: "24\\.[\\d]+\\.[\\d]+"
54 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
55 | with:
56 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
57 | owner: graalvm
58 | repository: graalvm-ce-builds
59 | tag_filter: "^jdk-(24\\.[\\d]+\\.[\\d])$"
60 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
61 | version: 24
62 | - name: Native Image 17
63 | id: native-image-svm
64 | version_pattern: "17\\.[\\d]+\\.[\\d]+"
65 | purl_pattern: "17\\.[\\d]+\\.[\\d]+"
66 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
67 | with:
68 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
69 | owner: graalvm
70 | repository: graalvm-ce-builds
71 | tag_filter: "^jdk-(17\\.[\\d]+\\.[\\d])$"
72 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
73 | version: 17
74 | - name: Native Image 21
75 | id: native-image-svm
76 | version_pattern: "21\\.[\\d]+\\.[\\d]+"
77 | purl_pattern: "21\\.[\\d]+\\.[\\d]+"
78 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
79 | with:
80 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
81 | owner: graalvm
82 | repository: graalvm-ce-builds
83 | tag_filter: "^jdk-(21\\.[\\d]+\\.[\\d])$"
84 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
85 | version: 21
86 | - name: Native Image 24
87 | id: native-image-svm
88 | version_pattern: "24\\.[\\d]+\\.[\\d]+"
89 | purl_pattern: "24\\.[\\d]+\\.[\\d]+"
90 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
91 | with:
92 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
93 | owner: graalvm
94 | repository: graalvm-ce-builds
95 | tag_filter: "^jdk-(24\\.[\\d]+\\.[\\d])$"
96 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
97 | version: 24
98 |
99 | # ARM64
100 | - name: JDK 17 ARM64
101 | id: jdk
102 | version_pattern: "17\\.[\\d]+\\.[\\d]+"
103 | purl_pattern: "17\\.[\\d]+\\.[\\d]+"
104 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
105 | with:
106 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
107 | owner: graalvm
108 | repository: graalvm-ce-builds
109 | tag_filter: "^jdk-(17\\.[\\d]+\\.[\\d])$"
110 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
111 | version: 17
112 | arch: arm64
113 | - name: JDK 21 ARM64
114 | id: jdk
115 | version_pattern: "21\\.[\\d]+\\.[\\d]+"
116 | purl_pattern: "21\\.[\\d]+\\.[\\d]+"
117 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
118 | with:
119 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
120 | owner: graalvm
121 | repository: graalvm-ce-builds
122 | tag_filter: "^jdk-(21\\.[\\d]+\\.[\\d])$"
123 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
124 | version: 21
125 | arch: arm64
126 | - name: JDK 24 ARM64
127 | id: jdk
128 | version_pattern: "24\\.[\\d]+\\.[\\d]+"
129 | purl_pattern: "24\\.[\\d]+\\.[\\d]+"
130 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
131 | with:
132 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
133 | owner: graalvm
134 | repository: graalvm-ce-builds
135 | tag_filter: "^jdk-(24\\.[\\d]+\\.[\\d])$"
136 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
137 | version: 24
138 | arch: arm64
139 | - name: Native Image 17 ARM64
140 | id: native-image-svm
141 | version_pattern: "17\\.[\\d]+\\.[\\d]+"
142 | purl_pattern: "17\\.[\\d]+\\.[\\d]+"
143 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
144 | with:
145 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
146 | owner: graalvm
147 | repository: graalvm-ce-builds
148 | tag_filter: "^jdk-(17\\.[\\d]+\\.[\\d])$"
149 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
150 | version: 17
151 | arch: arm64
152 | - name: Native Image 21 ARM64
153 | id: native-image-svm
154 | version_pattern: "21\\.[\\d]+\\.[\\d]+"
155 | purl_pattern: "21\\.[\\d]+\\.[\\d]+"
156 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
157 | with:
158 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
159 | owner: graalvm
160 | repository: graalvm-ce-builds
161 | tag_filter: "^jdk-(21\\.[\\d]+\\.[\\d])$"
162 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
163 | version: 21
164 | arch: arm64
165 | - name: Native Image 24 ARM64
166 | id: native-image-svm
167 | version_pattern: "24\\.[\\d]+\\.[\\d]+"
168 | purl_pattern: "24\\.[\\d]+\\.[\\d]+"
169 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
170 | with:
171 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
172 | owner: graalvm
173 | repository: graalvm-ce-builds
174 | tag_filter: "^jdk-(24\\.[\\d]+\\.[\\d])$"
175 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
176 | version: 24
177 | arch: arm64
178 |
--------------------------------------------------------------------------------
/.github/pipeline-version:
--------------------------------------------------------------------------------
1 | 1.42.0
2 |
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 | template: $CHANGES
2 | name-template: $RESOLVED_VERSION
3 | tag-template: v$RESOLVED_VERSION
4 | categories:
5 | - title: ⭐️ Enhancements
6 | labels:
7 | - type:enhancement
8 | - title: "\U0001F41E Bug Fixes"
9 | labels:
10 | - type:bug
11 | - title: "\U0001F4D4 Documentation"
12 | labels:
13 | - type:documentation
14 | - title: ⛏ Dependency Upgrades
15 | labels:
16 | - type:dependency-upgrade
17 | - title: "\U0001F6A7 Tasks"
18 | labels:
19 | - type:task
20 | exclude-labels:
21 | - type:question
22 | version-resolver:
23 | major:
24 | labels:
25 | - semver:major
26 | minor:
27 | labels:
28 | - semver:minor
29 | patch:
30 | labels:
31 | - semver:patch
32 | default: patch
33 |
--------------------------------------------------------------------------------
/.github/workflows/pb-create-package.yml:
--------------------------------------------------------------------------------
1 | name: Create Package
2 | "on":
3 | release:
4 | types:
5 | - published
6 | jobs:
7 | create-package:
8 | name: Create Package
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - name: Docker login gcr.io
13 | if: ${{ (github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork) && (github.actor != 'dependabot[bot]') }}
14 | uses: docker/login-action@v3
15 | with:
16 | password: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }}
17 | registry: gcr.io
18 | username: _json_key
19 | - name: Docker login docker.io
20 | if: ${{ (github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork) && (github.actor != 'dependabot[bot]') }}
21 | uses: docker/login-action@v3
22 | with:
23 | password: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }}
24 | registry: docker.io
25 | username: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }}
26 | - uses: actions/setup-go@v5
27 | with:
28 | go-version: "1.24"
29 | - name: Install create-package
30 | run: |
31 | #!/usr/bin/env bash
32 |
33 | set -euo pipefail
34 |
35 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest
36 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
37 | with:
38 | crane-version: 0.20.3
39 | yj-version: 5.1.0
40 | - uses: buildpacks/github-actions/setup-pack@v5.8.9
41 | with:
42 | pack-version: 0.36.4
43 | - name: Enable pack Experimental
44 | if: ${{ false }}
45 | run: |
46 | #!/usr/bin/env bash
47 |
48 | set -euo pipefail
49 |
50 | echo "Enabling pack experimental features"
51 |
52 | mkdir -p "${HOME}"/.pack
53 | echo "experimental = true" >> "${HOME}"/.pack/config.toml
54 | - uses: actions/checkout@v4
55 | - if: ${{ false }}
56 | uses: actions/cache@v4
57 | with:
58 | key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }}
59 | path: |-
60 | ${{ env.HOME }}/.pack
61 | ${{ env.HOME }}/carton-cache
62 | restore-keys: ${{ runner.os }}-go-
63 | - name: Compute Version
64 | id: version
65 | run: |
66 | #!/usr/bin/env bash
67 |
68 | set -euo pipefail
69 |
70 | if [[ ${GITHUB_REF:-} != "refs/"* ]]; then
71 | echo "GITHUB_REF set to [${GITHUB_REF:-}], but that is unexpected. It should start with 'refs/*'"
72 | exit 255
73 | fi
74 |
75 | if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
76 | VERSION=${BASH_REMATCH[1]}
77 |
78 | MAJOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 }')"
79 | MINOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 "." $2 }')"
80 |
81 | echo "version-major=${MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
82 | echo "version-minor=${MINOR_VERSION}" >> "$GITHUB_OUTPUT"
83 | elif [[ ${GITHUB_REF} =~ refs/heads/(.+) ]]; then
84 | VERSION=${BASH_REMATCH[1]}
85 | else
86 | VERSION=$(git rev-parse --short HEAD)
87 | fi
88 |
89 | echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
90 | echo "Selected ${VERSION} from
91 | * ref: ${GITHUB_REF}
92 | * sha: ${GITHUB_SHA}
93 | "
94 | - name: Create Package
95 | run: |
96 | #!/usr/bin/env bash
97 |
98 | set -euo pipefail
99 |
100 | # With Go 1.20, we need to set this so that we produce statically compiled binaries
101 | #
102 | # Starting with Go 1.20, Go will produce binaries that are dynamically linked against libc
103 | # which can cause compatibility issues. The compiler links against libc on the build system
104 | # but that may be newer than on the stacks we support.
105 | export CGO_ENABLED=0
106 |
107 | if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then
108 | create-package \
109 | --source "${SOURCE_PATH:-.}" \
110 | --cache-location "${HOME}"/carton-cache \
111 | --destination "${HOME}"/buildpack \
112 | --include-dependencies \
113 | --version "${VERSION}"
114 | else
115 | create-package \
116 | --source "${SOURCE_PATH:-.}" \
117 | --destination "${HOME}"/buildpack \
118 | --version "${VERSION}"
119 | fi
120 |
121 | PACKAGE_FILE="${SOURCE_PATH:-.}/package.toml"
122 | if [ -f "${PACKAGE_FILE}" ]; then
123 | cp "${PACKAGE_FILE}" "${HOME}/buildpack/package.toml"
124 | printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}/buildpack" "${OS}" >> "${HOME}/buildpack/package.toml"
125 | fi
126 | env:
127 | INCLUDE_DEPENDENCIES: "false"
128 | OS: linux
129 | SOURCE_PATH: ""
130 | VERSION: ${{ steps.version.outputs.version }}
131 | - name: Package Buildpack
132 | id: package
133 | run: |-
134 | #!/usr/bin/env bash
135 |
136 | set -euo pipefail
137 |
138 | COMPILED_BUILDPACK="${HOME}/buildpack"
139 |
140 | # create-package puts the buildpack here, we need to run from that directory
141 | # for component buildpacks so that pack doesn't need a package.toml
142 | cd "${COMPILED_BUILDPACK}"
143 | CONFIG=""
144 | if [ -f "${COMPILED_BUILDPACK}/package.toml" ]; then
145 | CONFIG="--config ${COMPILED_BUILDPACK}/package.toml"
146 | fi
147 |
148 | PACKAGE_LIST=($PACKAGES)
149 | # Extract first repo (Docker Hub) as the main to package & register
150 | PACKAGE=${PACKAGE_LIST[0]}
151 |
152 | if [[ "${PUBLISH:-x}" == "true" ]]; then
153 | pack -v buildpack package \
154 | "${PACKAGE}:${VERSION}" ${CONFIG} \
155 | --publish
156 |
157 | if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
158 | crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}"
159 | crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}"
160 | fi
161 | crane tag "${PACKAGE}:${VERSION}" latest
162 | echo "digest=$(crane digest "${PACKAGE}:${VERSION}")" >> "$GITHUB_OUTPUT"
163 |
164 | # copy to other repositories specified
165 | for P in "${PACKAGE_LIST[@]}"
166 | do
167 | if [ "$P" != "$PACKAGE" ]; then
168 | crane copy "${PACKAGE}:${VERSION}" "${P}:${VERSION}"
169 | if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
170 | crane tag "${P}:${VERSION}" "${VERSION_MINOR}"
171 | crane tag "${P}:${VERSION}" "${VERSION_MAJOR}"
172 | fi
173 | crane tag "${P}:${VERSION}" latest
174 | fi
175 | done
176 |
177 | else
178 | pack -v buildpack package \
179 | "${PACKAGE}:${VERSION}" ${CONFIG} \
180 | --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish")
181 | fi
182 | env:
183 | PACKAGES: docker.io/paketobuildpacks/graalvm gcr.io/paketo-buildpacks/graalvm
184 | PUBLISH: "true"
185 | VERSION: ${{ steps.version.outputs.version }}
186 | VERSION_MAJOR: ${{ steps.version.outputs.version-major }}
187 | VERSION_MINOR: ${{ steps.version.outputs.version-minor }}
188 | - name: Update release with digest
189 | run: |
190 | #!/usr/bin/env bash
191 |
192 | set -euo pipefail
193 |
194 | PAYLOAD=$(cat "${GITHUB_EVENT_PATH}")
195 |
196 | RELEASE_ID=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.release.id')
197 | RELEASE_TAG_NAME=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.release.tag_name')
198 | RELEASE_NAME=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.release.name')
199 | RELEASE_BODY=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.release.body')
200 |
201 | gh api \
202 | --method PATCH \
203 | "/repos/:owner/:repo/releases/${RELEASE_ID}" \
204 | --field "tag_name=${RELEASE_TAG_NAME}" \
205 | --field "name=${RELEASE_NAME}" \
206 | --field "body=${RELEASE_BODY///\`${DIGEST}\`}"
207 | env:
208 | DIGEST: ${{ steps.package.outputs.digest }}
209 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
210 | - if: ${{ true }}
211 | uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.8.9
212 | with:
213 | address: docker.io/paketobuildpacks/graalvm@${{ steps.package.outputs.digest }}
214 | id: paketo-buildpacks/graalvm
215 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
216 | version: ${{ steps.version.outputs.version }}
217 |
--------------------------------------------------------------------------------
/.github/workflows/pb-minimal-labels.yml:
--------------------------------------------------------------------------------
1 | name: Minimal Labels
2 | "on":
3 | pull_request:
4 | types:
5 | - synchronize
6 | - reopened
7 | - labeled
8 | - unlabeled
9 | jobs:
10 | semver:
11 | name: Minimal Semver Labels
12 | runs-on:
13 | - ubuntu-latest
14 | steps:
15 | - uses: mheap/github-action-required-labels@v5
16 | with:
17 | count: 1
18 | labels: semver:major, semver:minor, semver:patch
19 | mode: exactly
20 | type:
21 | name: Minimal Type Labels
22 | runs-on:
23 | - ubuntu-latest
24 | steps:
25 | - uses: mheap/github-action-required-labels@v5
26 | with:
27 | count: 1
28 | labels: type:bug, type:dependency-upgrade, type:documentation, type:enhancement, type:question, type:task
29 | mode: exactly
30 |
--------------------------------------------------------------------------------
/.github/workflows/pb-synchronize-labels.yml:
--------------------------------------------------------------------------------
1 | name: Synchronize Labels
2 | "on":
3 | push:
4 | branches:
5 | - main
6 | paths:
7 | - .github/labels.yml
8 | jobs:
9 | synchronize:
10 | name: Synchronize Labels
11 | runs-on:
12 | - ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v4
15 | - uses: micnncim/action-label-syncer@v1
16 | env:
17 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
18 |
--------------------------------------------------------------------------------
/.github/workflows/pb-tests.yml:
--------------------------------------------------------------------------------
1 | name: Tests
2 | "on":
3 | merge_group:
4 | types:
5 | - checks_requested
6 | branches:
7 | - main
8 | pull_request: {}
9 | push:
10 | branches:
11 | - main
12 | jobs:
13 | create-package:
14 | name: Create Package Test
15 | runs-on:
16 | - ubuntu-latest
17 | steps:
18 | - uses: actions/setup-go@v5
19 | with:
20 | go-version: "1.24"
21 | - name: Install create-package
22 | run: |
23 | #!/usr/bin/env bash
24 |
25 | set -euo pipefail
26 |
27 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest
28 | - uses: buildpacks/github-actions/setup-pack@v5.8.9
29 | with:
30 | pack-version: 0.36.4
31 | - name: Enable pack Experimental
32 | if: ${{ false }}
33 | run: |
34 | #!/usr/bin/env bash
35 |
36 | set -euo pipefail
37 |
38 | echo "Enabling pack experimental features"
39 |
40 | mkdir -p "${HOME}"/.pack
41 | echo "experimental = true" >> "${HOME}"/.pack/config.toml
42 | - uses: actions/checkout@v4
43 | - uses: actions/cache@v4
44 | with:
45 | key: ${{ runner.os }}-go-${{ hashFiles('**/buildpack.toml', '**/package.toml') }}
46 | path: |-
47 | ${{ env.HOME }}/.pack
48 | ${{ env.HOME }}/carton-cache
49 | restore-keys: ${{ runner.os }}-go-
50 | - name: Compute Version
51 | id: version
52 | run: |
53 | #!/usr/bin/env bash
54 |
55 | set -euo pipefail
56 |
57 | if [[ ${GITHUB_REF:-} != "refs/"* ]]; then
58 | echo "GITHUB_REF set to [${GITHUB_REF:-}], but that is unexpected. It should start with 'refs/*'"
59 | exit 255
60 | fi
61 |
62 | if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
63 | VERSION=${BASH_REMATCH[1]}
64 |
65 | MAJOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 }')"
66 | MINOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 "." $2 }')"
67 |
68 | echo "version-major=${MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
69 | echo "version-minor=${MINOR_VERSION}" >> "$GITHUB_OUTPUT"
70 | elif [[ ${GITHUB_REF} =~ refs/heads/(.+) ]]; then
71 | VERSION=${BASH_REMATCH[1]}
72 | else
73 | VERSION=$(git rev-parse --short HEAD)
74 | fi
75 |
76 | echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
77 | echo "Selected ${VERSION} from
78 | * ref: ${GITHUB_REF}
79 | * sha: ${GITHUB_SHA}
80 | "
81 | - name: Create Package
82 | run: |
83 | #!/usr/bin/env bash
84 |
85 | set -euo pipefail
86 |
87 | # With Go 1.20, we need to set this so that we produce statically compiled binaries
88 | #
89 | # Starting with Go 1.20, Go will produce binaries that are dynamically linked against libc
90 | # which can cause compatibility issues. The compiler links against libc on the build system
91 | # but that may be newer than on the stacks we support.
92 | export CGO_ENABLED=0
93 |
94 | if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then
95 | create-package \
96 | --source "${SOURCE_PATH:-.}" \
97 | --cache-location "${HOME}"/carton-cache \
98 | --destination "${HOME}"/buildpack \
99 | --include-dependencies \
100 | --version "${VERSION}"
101 | else
102 | create-package \
103 | --source "${SOURCE_PATH:-.}" \
104 | --destination "${HOME}"/buildpack \
105 | --version "${VERSION}"
106 | fi
107 |
108 | PACKAGE_FILE="${SOURCE_PATH:-.}/package.toml"
109 | if [ -f "${PACKAGE_FILE}" ]; then
110 | cp "${PACKAGE_FILE}" "${HOME}/buildpack/package.toml"
111 | printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}/buildpack" "${OS}" >> "${HOME}/buildpack/package.toml"
112 | fi
113 | env:
114 | INCLUDE_DEPENDENCIES: "true"
115 | OS: linux
116 | VERSION: ${{ steps.version.outputs.version }}
117 | - name: Package Buildpack
118 | run: |-
119 | #!/usr/bin/env bash
120 |
121 | set -euo pipefail
122 |
123 | COMPILED_BUILDPACK="${HOME}/buildpack"
124 |
125 | # create-package puts the buildpack here, we need to run from that directory
126 | # for component buildpacks so that pack doesn't need a package.toml
127 | cd "${COMPILED_BUILDPACK}"
128 | CONFIG=""
129 | if [ -f "${COMPILED_BUILDPACK}/package.toml" ]; then
130 | CONFIG="--config ${COMPILED_BUILDPACK}/package.toml"
131 | fi
132 |
133 | PACKAGE_LIST=($PACKAGES)
134 | # Extract first repo (Docker Hub) as the main to package & register
135 | PACKAGE=${PACKAGE_LIST[0]}
136 |
137 | if [[ "${PUBLISH:-x}" == "true" ]]; then
138 | pack -v buildpack package \
139 | "${PACKAGE}:${VERSION}" ${CONFIG} \
140 | --publish
141 |
142 | if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
143 | crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}"
144 | crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}"
145 | fi
146 | crane tag "${PACKAGE}:${VERSION}" latest
147 | echo "digest=$(crane digest "${PACKAGE}:${VERSION}")" >> "$GITHUB_OUTPUT"
148 |
149 | # copy to other repositories specified
150 | for P in "${PACKAGE_LIST[@]}"
151 | do
152 | if [ "$P" != "$PACKAGE" ]; then
153 | crane copy "${PACKAGE}:${VERSION}" "${P}:${VERSION}"
154 | if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
155 | crane tag "${P}:${VERSION}" "${VERSION_MINOR}"
156 | crane tag "${P}:${VERSION}" "${VERSION_MAJOR}"
157 | fi
158 | crane tag "${P}:${VERSION}" latest
159 | fi
160 | done
161 |
162 | else
163 | pack -v buildpack package \
164 | "${PACKAGE}:${VERSION}" ${CONFIG} \
165 | --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish")
166 | fi
167 | env:
168 | FORMAT: image
169 | PACKAGES: test
170 | TTL_SH_PUBLISH: "false"
171 | VERSION: ${{ steps.version.outputs.version }}
172 | unit:
173 | name: Unit Test
174 | runs-on:
175 | - ubuntu-latest
176 | steps:
177 | - uses: actions/checkout@v4
178 | - uses: actions/cache@v4
179 | with:
180 | key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
181 | path: ${{ env.HOME }}/go/pkg/mod
182 | restore-keys: ${{ runner.os }}-go-
183 | - uses: actions/setup-go@v5
184 | with:
185 | go-version: "1.24"
186 | - name: Install richgo
187 | run: |
188 | #!/usr/bin/env bash
189 |
190 | set -euo pipefail
191 |
192 | echo "Installing richgo ${RICHGO_VERSION}"
193 |
194 | mkdir -p "${HOME}"/bin
195 | echo "${HOME}/bin" >> "${GITHUB_PATH}"
196 |
197 | curl \
198 | --location \
199 | --show-error \
200 | --silent \
201 | "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \
202 | | tar -C "${HOME}"/bin -xz richgo
203 | env:
204 | RICHGO_VERSION: 0.3.10
205 | - name: Run Tests
206 | run: |
207 | #!/usr/bin/env bash
208 |
209 | set -euo pipefail
210 |
211 | richgo test ./...
212 | env:
213 | RICHGO_FORCE_COLOR: "1"
214 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-draft-release.yml:
--------------------------------------------------------------------------------
1 | name: Update Draft Release
2 | "on":
3 | push:
4 | branches:
5 | - main
6 | jobs:
7 | update:
8 | name: Update Draft Release
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - id: release-drafter
13 | uses: release-drafter/release-drafter@v5
14 | env:
15 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
16 | - uses: actions/checkout@v4
17 | - name: Update draft release with buildpack information
18 | uses: docker://ghcr.io/paketo-buildpacks/actions/draft-release:main
19 | with:
20 | github_token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
21 | release_body: ${{ steps.release-drafter.outputs.body }}
22 | release_id: ${{ steps.release-drafter.outputs.id }}
23 | release_name: ${{ steps.release-drafter.outputs.name }}
24 | release_tag_name: ${{ steps.release-drafter.outputs.tag_name }}
25 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-go.yml:
--------------------------------------------------------------------------------
1 | name: Update Go
2 | "on":
3 | schedule:
4 | - cron: 8 2 * * 1
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Go
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - uses: actions/checkout@v4
16 | - name: Update Go Version & Modules
17 | id: update-go
18 | run: |
19 | #!/usr/bin/env bash
20 |
21 | set -euo pipefail
22 |
23 | if [ -z "${GO_VERSION:-}" ]; then
24 | echo "No go version set"
25 | exit 1
26 | fi
27 |
28 | OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2 | cut -d '.' -f 1-2)
29 |
30 | go mod edit -go="$GO_VERSION"
31 | go mod tidy
32 | go get -u -t ./...
33 | go mod tidy
34 |
35 | git add go.mod go.sum
36 | git checkout -- .
37 |
38 | if [ "$OLD_GO_VERSION" == "$GO_VERSION" ]; then
39 | COMMIT_TITLE="Bump Go Modules"
40 | COMMIT_BODY="Bumps Go modules used by the project. See the commit for details on what modules were updated."
41 | COMMIT_SEMVER="semver:patch"
42 | else
43 | COMMIT_TITLE="Bump Go from ${OLD_GO_VERSION} to ${GO_VERSION}"
44 | COMMIT_BODY="Bumps Go from ${OLD_GO_VERSION} to ${GO_VERSION} and update Go modules used by the project. See the commit for details on what modules were updated."
45 | COMMIT_SEMVER="semver:minor"
46 | fi
47 |
48 | echo "commit-title=${COMMIT_TITLE}" >> "$GITHUB_OUTPUT"
49 | echo "commit-body=${COMMIT_BODY}" >> "$GITHUB_OUTPUT"
50 | echo "commit-semver=${COMMIT_SEMVER}" >> "$GITHUB_OUTPUT"
51 | env:
52 | GO_VERSION: "1.24"
53 | - uses: peter-evans/create-pull-request@v6
54 | with:
55 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
56 | body: |-
57 | ${{ steps.update-go.outputs.commit-body }}
58 |
59 |
60 | Release Notes
61 | ${{ steps.pipeline.outputs.release-notes }}
62 |
63 | branch: update/go
64 | commit-message: |-
65 | ${{ steps.update-go.outputs.commit-title }}
66 |
67 | ${{ steps.update-go.outputs.commit-body }}
68 | delete-branch: true
69 | labels: ${{ steps.update-go.outputs.commit-semver }}, type:task
70 | signoff: true
71 | title: ${{ steps.update-go.outputs.commit-title }}
72 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
73 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-17-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 17 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(17\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 17
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: jdk
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 17\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 17\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `JDK 17 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/jdk-17-arm-64
100 | commit-message: |-
101 | Bump JDK 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps JDK 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump JDK 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-17.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 17
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(17\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 17
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: jdk
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 17\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 17\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `JDK 17` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/jdk-17
99 | commit-message: |-
100 | Bump JDK 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps JDK 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump JDK 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-21-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 21 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(21\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 21
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: jdk
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 21\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 21\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `JDK 21 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/jdk-21-arm-64
100 | commit-message: |-
101 | Bump JDK 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps JDK 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump JDK 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-21.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 21
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(21\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 21
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: jdk
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 21\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 21\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `JDK 21` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/jdk-21
99 | commit-message: |-
100 | Bump JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump JDK 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-24-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 24 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(24\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 24
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: jdk
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 24\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 24\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `JDK 24 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/jdk-24-arm-64
100 | commit-message: |-
101 | Bump JDK 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps JDK 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump JDK 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-jdk-24.yml:
--------------------------------------------------------------------------------
1 | name: Update JDK 24
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(24\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 24
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: jdk
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 24\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 24\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `JDK 24` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/jdk-24
99 | commit-message: |-
100 | Bump JDK 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps JDK 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump JDK 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-17-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 17 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(17\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 17
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: native-image-svm
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 17\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 17\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `Native Image 17 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/native-image-17-arm-64
100 | commit-message: |-
101 | Bump Native Image 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps Native Image 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump Native Image 17 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-17.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 17
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(17\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 17
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: native-image-svm
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 17\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 17\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `Native Image 17` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/native-image-17
99 | commit-message: |-
100 | Bump Native Image 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps Native Image 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump Native Image 17 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-21-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 21 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(21\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 21
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: native-image-svm
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 21\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 21\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `Native Image 21 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/native-image-21-arm-64
100 | commit-message: |-
101 | Bump Native Image 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps Native Image 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump Native Image 21 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-21.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 21
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(21\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 21
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: native-image-svm
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 21\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 21\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `Native Image 21` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/native-image-21
99 | commit-message: |-
100 | Bump Native Image 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps Native Image 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump Native Image 21 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-24-arm-64.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 24 ARM64
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | arch: arm64
31 | glob: graalvm-community-jdk-.*_linux-aarch64_bin.tar.gz
32 | owner: graalvm
33 | repository: graalvm-ce-builds
34 | tag_filter: ^jdk-(24\.[\d]+\.[\d])$
35 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
36 | version: 24
37 | - name: Update Buildpack Dependency
38 | id: buildpack
39 | run: |
40 | #!/usr/bin/env bash
41 |
42 | set -euo pipefail
43 |
44 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
45 | ARCH=${ARCH:-amd64}
46 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
47 |
48 | if [ -z "$OLD_VERSION" ]; then
49 | ARCH="" # empty means noarch
50 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
51 | fi
52 |
53 | update-buildpack-dependency \
54 | --buildpack-toml buildpack.toml \
55 | --id "${ID}" \
56 | --arch "${ARCH}" \
57 | --version-pattern "${VERSION_PATTERN}" \
58 | --version "${VERSION}" \
59 | --cpe-pattern "${CPE_PATTERN:-}" \
60 | --cpe "${CPE:-}" \
61 | --purl-pattern "${PURL_PATTERN:-}" \
62 | --purl "${PURL:-}" \
63 | --uri "${URI}" \
64 | --sha256 "${SHA256}" \
65 | --source "${SOURCE_URI}" \
66 | --source-sha256 "${SOURCE_SHA256}"
67 |
68 | git add buildpack.toml
69 | git checkout -- .
70 |
71 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
72 | LABEL="semver:major"
73 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
74 | LABEL="semver:minor"
75 | else
76 | LABEL="semver:patch"
77 | fi
78 |
79 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
81 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
82 | env:
83 | ARCH: arm64
84 | CPE: ${{ steps.dependency.outputs.cpe }}
85 | CPE_PATTERN: ""
86 | ID: native-image-svm
87 | PURL: ${{ steps.dependency.outputs.purl }}
88 | PURL_PATTERN: 24\.[\d]+\.[\d]+
89 | SHA256: ${{ steps.dependency.outputs.sha256 }}
90 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
91 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
92 | URI: ${{ steps.dependency.outputs.uri }}
93 | VERSION: ${{ steps.dependency.outputs.version }}
94 | VERSION_PATTERN: 24\.[\d]+\.[\d]+
95 | - uses: peter-evans/create-pull-request@v6
96 | with:
97 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
98 | body: Bumps `Native Image 24 ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
99 | branch: update/buildpack/native-image-24-arm-64
100 | commit-message: |-
101 | Bump Native Image 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
102 |
103 | Bumps Native Image 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
104 | delete-branch: true
105 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
106 | signoff: true
107 | title: Bump Native Image 24 ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
108 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
109 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-native-image-24.yml:
--------------------------------------------------------------------------------
1 | name: Update Native Image 24
2 | "on":
3 | schedule:
4 | - cron: 0 5 * * 1-5
5 | workflow_dispatch: {}
6 | jobs:
7 | update:
8 | name: Update Buildpack Dependency
9 | runs-on:
10 | - ubuntu-latest
11 | steps:
12 | - uses: actions/setup-go@v5
13 | with:
14 | go-version: "1.24"
15 | - name: Install update-buildpack-dependency
16 | run: |
17 | #!/usr/bin/env bash
18 |
19 | set -euo pipefail
20 |
21 | go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest
22 | - uses: buildpacks/github-actions/setup-tools@v5.8.9
23 | with:
24 | crane-version: 0.20.3
25 | yj-version: 5.1.0
26 | - uses: actions/checkout@v4
27 | - id: dependency
28 | uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
29 | with:
30 | glob: graalvm-community-jdk-.*_linux-x64_bin.tar.gz
31 | owner: graalvm
32 | repository: graalvm-ce-builds
33 | tag_filter: ^jdk-(24\.[\d]+\.[\d])$
34 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
35 | version: 24
36 | - name: Update Buildpack Dependency
37 | id: buildpack
38 | run: |
39 | #!/usr/bin/env bash
40 |
41 | set -euo pipefail
42 |
43 | VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )")
44 | ARCH=${ARCH:-amd64}
45 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version')
46 |
47 | if [ -z "$OLD_VERSION" ]; then
48 | ARCH="" # empty means noarch
49 | OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version")
50 | fi
51 |
52 | update-buildpack-dependency \
53 | --buildpack-toml buildpack.toml \
54 | --id "${ID}" \
55 | --arch "${ARCH}" \
56 | --version-pattern "${VERSION_PATTERN}" \
57 | --version "${VERSION}" \
58 | --cpe-pattern "${CPE_PATTERN:-}" \
59 | --cpe "${CPE:-}" \
60 | --purl-pattern "${PURL_PATTERN:-}" \
61 | --purl "${PURL:-}" \
62 | --uri "${URI}" \
63 | --sha256 "${SHA256}" \
64 | --source "${SOURCE_URI}" \
65 | --source-sha256 "${SOURCE_SHA256}"
66 |
67 | git add buildpack.toml
68 | git checkout -- .
69 |
70 | if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then
71 | LABEL="semver:major"
72 | elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then
73 | LABEL="semver:minor"
74 | else
75 | LABEL="semver:patch"
76 | fi
77 |
78 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
79 | echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT"
80 | echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT"
81 | env:
82 | ARCH: ""
83 | CPE: ${{ steps.dependency.outputs.cpe }}
84 | CPE_PATTERN: ""
85 | ID: native-image-svm
86 | PURL: ${{ steps.dependency.outputs.purl }}
87 | PURL_PATTERN: 24\.[\d]+\.[\d]+
88 | SHA256: ${{ steps.dependency.outputs.sha256 }}
89 | SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }}
90 | SOURCE_URI: ${{ steps.dependency.outputs.source }}
91 | URI: ${{ steps.dependency.outputs.uri }}
92 | VERSION: ${{ steps.dependency.outputs.version }}
93 | VERSION_PATTERN: 24\.[\d]+\.[\d]+
94 | - uses: peter-evans/create-pull-request@v6
95 | with:
96 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
97 | body: Bumps `Native Image 24` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
98 | branch: update/buildpack/native-image-24
99 | commit-message: |-
100 | Bump Native Image 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
101 |
102 | Bumps Native Image 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}.
103 | delete-branch: true
104 | labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade
105 | signoff: true
106 | title: Bump Native Image 24 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
107 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
108 |
--------------------------------------------------------------------------------
/.github/workflows/pb-update-pipeline.yml:
--------------------------------------------------------------------------------
1 | name: Update Pipeline
2 | "on":
3 | push:
4 | branches:
5 | - main
6 | paths:
7 | - .github/pipeline-descriptor.yml
8 | schedule:
9 | - cron: 0 5 * * 1-5
10 | workflow_dispatch: {}
11 | jobs:
12 | update:
13 | name: Update Pipeline
14 | runs-on:
15 | - ubuntu-latest
16 | steps:
17 | - uses: actions/setup-go@v5
18 | with:
19 | go-version: "1.24"
20 | - name: Install octo
21 | run: |
22 | #!/usr/bin/env bash
23 |
24 | set -euo pipefail
25 |
26 | go install -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo@latest
27 | - uses: actions/checkout@v4
28 | - name: Update Pipeline
29 | id: pipeline
30 | run: |
31 | #!/usr/bin/env bash
32 |
33 | set -euo pipefail
34 |
35 | if [[ -f .github/pipeline-version ]]; then
36 | OLD_VERSION=$(cat .github/pipeline-version)
37 | else
38 | OLD_VERSION="0.0.0"
39 | fi
40 |
41 | rm .github/workflows/pb-*.yml || true
42 | octo --descriptor "${DESCRIPTOR}"
43 |
44 | PAYLOAD=$(gh api /repos/paketo-buildpacks/pipeline-builder/releases/latest)
45 |
46 | NEW_VERSION=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.name')
47 | echo "${NEW_VERSION}" > .github/pipeline-version
48 |
49 | RELEASE_NOTES=$(
50 | gh api \
51 | -F text="$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.body')" \
52 | -F mode="gfm" \
53 | -F context="paketo-buildpacks/pipeline-builder" \
54 | -X POST /markdown
55 | )
56 |
57 | git add .github/
58 | git add .gitignore
59 |
60 | if [ -f scripts/build.sh ]; then
61 | git add scripts/build.sh
62 | fi
63 |
64 | git checkout -- .
65 |
66 | echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
67 | echo "new-version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
68 |
69 | DELIMITER=$(openssl rand -hex 16) # roughly the same entropy as uuid v4 used in https://github.com/actions/toolkit/blob/b36e70495fbee083eb20f600eafa9091d832577d/packages/core/src/file-command.ts#L28
70 | printf "release-notes<<%s\n%s\n%s\n" "${DELIMITER}" "${RELEASE_NOTES}" "${DELIMITER}" >> "${GITHUB_OUTPUT}" # see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
71 | env:
72 | DESCRIPTOR: .github/pipeline-descriptor.yml
73 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
74 | - uses: peter-evans/create-pull-request@v6
75 | with:
76 | author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com>
77 | body: |-
78 | Bumps pipeline from `${{ steps.pipeline.outputs.old-version }}` to `${{ steps.pipeline.outputs.new-version }}`.
79 |
80 |
81 | Release Notes
82 | ${{ steps.pipeline.outputs.release-notes }}
83 |
84 | branch: update/pipeline
85 | commit-message: |-
86 | Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}
87 |
88 | Bumps pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}.
89 | delete-branch: true
90 | labels: semver:patch, type:task
91 | signoff: true
92 | title: Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}
93 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
94 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Copyright 2018-2020 the original author or authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # https://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | bin/
16 | linux/
17 | dependencies/
18 | package/
19 | scratch/
20 |
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | https://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | https://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | graalvm
2 |
3 | Copyright (c) 2020-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
4 |
5 | This project is licensed to you under the Apache License, Version 2.0 (the "License").
6 | You may not use this project except in compliance with the License.
7 |
8 | This project may include a number of subcomponents with separate copyright notices
9 | and license terms. Your use of these subcomponents is subject to the terms and
10 | conditions of the subcomponent's license, as noted in the LICENSE file.
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # `gcr.io/paketo-buildpacks/graalvm`
2 |
3 | The Paketo Buildpack for GraalVM is a Cloud Native Buildpack that provides the GraalVM implementations of the JDK and GraalVM [Native Image builder][native-image].
4 |
5 | This buildpack is designed to work in collaboration with other buildpacks which request contributions of JREs, JDKs, or Native Image builder.
6 |
7 | ## Upstream releases
8 |
9 | The Paketo team will do its best to provide the latest GraalVM implementations of the JDK and GraalVM, whenever they become available, according to the [GraalVM Release Calendar](https://www.graalvm.org/release-calendar/).
10 |
11 | ## Behavior
12 |
13 | This buildpack will participate if any of the following conditions are met
14 |
15 | * Another buildpack requires `jdk`
16 | * Another buildpack requires `jre`
17 | * Another buildpack requires `native-image-builder`
18 |
19 | The buildpack will do the following if a JDK is requested:
20 |
21 | * Contributes a JDK to a layer marked `build` and `cache` with all commands on `$PATH`
22 | * Contributes `$JAVA_HOME` configured to the build layer
23 | * Contributes `$JDK_HOME` configure to the build layer
24 |
25 | The buildpack will do the following if `native-image-builder` is requested:
26 | * Contribute a JDK (see above)
27 | * Installs the Native Image Substrate VM into the JDK
28 | * Prevents the JRE from being installed, even if requested
29 |
30 | The buildpack will do the following if a JRE is requested:
31 |
32 | * Contributes a JDK to a layer with all commands on `$PATH` (GraalVM does not distribute a standalone JRE)
33 | * Contributes `$JAVA_HOME` configured to the layer
34 | * Contributes `-XX:ActiveProcessorCount` to the layer
35 | * Contributes `-XX:+ExitOnOutOfMemoryError` to the layer
36 | * Contributes `-XX:+UnlockDiagnosticVMOptions`,`-XX:NativeMemoryTracking=summary` & `-XX:+PrintNMTStatistics` to the layer (Java NMT)
37 | * If `BPL_JMX_ENABLED = true`
38 | * Contributes `-Djava.rmi.server.hostname=127.0.0.1`, `-Dcom.sun.management.jmxremote.authenticate=false`, `-Dcom.sun.management.jmxremote.ssl=false` & `-Dcom.sun.management.jmxremote.rmi.port=5000`
39 | * If `BPL_DEBUG_ENABLED = true`
40 | * Contributes `-agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n`.
41 | * If `BPL_JFR_ENABLED = true`
42 | * Contributes `-XX:StartFlightRecording=dumponexit=true,filename=/tmp/recording.jfr`
43 | * Contributes `$MALLOC_ARENA_MAX` to the layer
44 | * Disables JVM DNS caching if link-local DNS is available
45 | * If `metadata.build = true`
46 | * Marks layer as `build` and `cache`
47 | * If `metadata.launch = true`
48 | * Marks layer as `launch`
49 | * Contributes Memory Calculator to a layer marked `launch`
50 | * Contributes Heap Dump helper to a layer marked `launch`
51 |
52 | ## Configuration
53 |
54 | | Environment Variable | Description |
55 | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56 | | `$BP_JVM_VERSION` | Configure a specific JVM version (e.g. `17`, `21`). The buildpack will download JDK and Native Image Substrate VM 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. |
57 | | `$BPL_JVM_HEAD_ROOM` | Configure the percentage of headroom the memory calculator will allocated. Defaults to `0`. |
58 | | `$BPL_JVM_LOADED_CLASS_COUNT` | Configure the number of classes that will be loaded at runtime. Defaults to 35% of the number of classes. |
59 | | `$BPL_JVM_THREAD_COUNT` | Configure the number of user threads at runtime. Defaults to `250`. |
60 | | `$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%`. |
61 | | `$BPL_JAVA_NMT_ENABLED` | Configure whether Java Native Memory Tracking (NMT) is enabled. Defaults to `true`. Set this to `false` to disable NMT functionality. |
62 | | `$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. |
63 | | `$BPL_JMX_ENABLED` | Configure whether Java Management Extensions (JMX) is enabled. Defaults to `false`. Set this to `true` to enable JMX functionality. |
64 | | `$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 |
65 | | `$BPL_DEBUG_ENABLED` | Configure whether remote debugging features are enabled. Defaults to `false`. Set this to `true` to enable remote debugging. |
66 | | `$BPL_DEBUG_PORT` | Configure the port number for remote debugging. Defaults to `8000`. |
67 | | `$BPL_DEBUG_SUSPEND` | Configure whether to suspend execution until a debugger has attached. Defaults to `false`. |
68 | | `$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. |
69 | | `$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. |
70 | | `$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`.
71 | | `$BP_JVM_JLINK_ARGS` | Configure custom arguments to supply to the jlink tool. If any custom args are specified, no default args are supplied.
72 | | `$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. |
73 | | `$JAVA_TOOL_OPTIONS` | Configure the JVM launch flags |
74 |
75 | [bpv]: https://github.com/paketo-buildpacks/graalvm/releases
76 |
77 | ## Bindings
78 |
79 | The buildpack optionally accepts the following bindings:
80 |
81 | ### Type: `dependency-mapping`
82 |
83 | | Key | Value | Description |
84 | | --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
85 | | `` | `` | If needed, the buildpack will fetch the dependency with digest `` from `` |
86 |
87 | ## License
88 |
89 | This buildpack is released under version 2.0 of the [Apache License][a].
90 |
91 | [a]: http://www.apache.org/licenses/LICENSE-2.0
92 | [native-image]: https://www.graalvm.org/reference-manual/native-image/
93 |
94 |
--------------------------------------------------------------------------------
/buildpack.toml:
--------------------------------------------------------------------------------
1 | # Copyright 2018-2024 the original author or authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # https://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | api = "0.7"
16 |
17 | [buildpack]
18 | description = "A Cloud Native Buildpack that provides the GraalVM implementations of JREs, JDKs and Native Image tools"
19 | homepage = "https://github.com/paketo-buildpacks/graalvm"
20 | id = "paketo-buildpacks/graalvm"
21 | keywords = ["java", "jvm", "jre", "jdk", "native-image"]
22 | name = "Paketo Buildpack for GraalVM"
23 | sbom-formats = ["application/vnd.cyclonedx+json", "application/vnd.syft+json"]
24 | version = "{{.version}}"
25 |
26 | [[buildpack.licenses]]
27 | type = "Apache-2.0"
28 | uri = "https://github.com/paketo-buildpacks/graalvm/blob/main/LICENSE"
29 |
30 | [metadata]
31 | include-files = ["LICENSE", "NOTICE", "README.md", "linux/amd64/bin/build", "linux/amd64/bin/detect", "linux/amd64/bin/main", "linux/amd64/bin/helper", "linux/arm64/bin/build", "linux/arm64/bin/detect", "linux/arm64/bin/main", "linux/arm64/bin/helper", "buildpack.toml"]
32 | pre-package = "scripts/build.sh"
33 |
34 | [[metadata.configurations]]
35 | default = "0"
36 | description = "the headroom in memory calculation"
37 | launch = true
38 | name = "BPL_JVM_HEAD_ROOM"
39 |
40 | [[metadata.configurations]]
41 | default = "35% of classes"
42 | description = "the number of loaded classes in memory calculation"
43 | launch = true
44 | name = "BPL_JVM_LOADED_CLASS_COUNT"
45 |
46 | [[metadata.configurations]]
47 | default = "250"
48 | description = "the number of threads in memory calculation"
49 | launch = true
50 | name = "BPL_JVM_THREAD_COUNT"
51 |
52 | [[metadata.configurations]]
53 | default = ""
54 | description = "write heap dumps on error to this path"
55 | launch = true
56 | name = "BPL_HEAP_DUMP_PATH"
57 |
58 | [[metadata.configurations]]
59 | default = "true"
60 | description = "enables Java Native Memory Tracking (NMT)"
61 | launch = true
62 | name = "BPL_JAVA_NMT_ENABLED"
63 |
64 | [[metadata.configurations]]
65 | default = "summary"
66 | description = "configure level of NMT, summary or detail"
67 | launch = true
68 | name = "BPL_JAVA_NMT_LEVEL"
69 |
70 | [[metadata.configurations]]
71 | default = "false"
72 | description = "enables Java Management Extensions (JMX)"
73 | launch = true
74 | name = "BPL_JMX_ENABLED"
75 |
76 | [[metadata.configurations]]
77 | default = "5000"
78 | description = "configure the JMX port"
79 | launch = true
80 | name = "BPL_JMX_PORT"
81 |
82 | [[metadata.configurations]]
83 | default = "false"
84 | description = "enables Java remote debugging support"
85 | launch = true
86 | name = "BPL_DEBUG_ENABLED"
87 |
88 | [[metadata.configurations]]
89 | default = "8000"
90 | description = "configure the remote debugging port"
91 | launch = true
92 | name = "BPL_DEBUG_PORT"
93 |
94 | [[metadata.configurations]]
95 | default = "false"
96 | description = "configure whether to suspend execution until a debugger has attached"
97 | launch = true
98 | name = "BPL_DEBUG_SUSPEND"
99 |
100 | [[metadata.configurations]]
101 | default = "false"
102 | description = "enables Java Flight Recording (JFR)"
103 | launch = true
104 | name = "BPL_JFR_ENABLED"
105 |
106 | [[metadata.configurations]]
107 | default = ""
108 | description = "configure custom Java Flight Recording (JFR) arguments"
109 | launch = true
110 | name = "BPL_JFR_ARGS"
111 |
112 | [[metadata.configurations]]
113 | build = true
114 | default = "false"
115 | description = "enables running jlink tool to generate custom JRE"
116 | name = "BP_JVM_JLINK_ENABLED"
117 |
118 | [[metadata.configurations]]
119 | build = true
120 | default = "--no-man-pages --no-header-files --strip-debug --compress=1"
121 | description = "configure custom link arguments (--output must be omitted)"
122 | name = "BP_JVM_JLINK_ARGS"
123 |
124 | [[metadata.configurations]]
125 | build = true
126 | default = "21"
127 | description = "the Java version"
128 | name = "BP_JVM_VERSION"
129 |
130 | [[metadata.configurations]]
131 | description = "the JVM launch flags"
132 | launch = true
133 | name = "JAVA_TOOL_OPTIONS"
134 |
135 | [[metadata.dependencies]]
136 | cpes = ["cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*:*"]
137 | id = "jdk"
138 | name = "GraalVM for JDK"
139 | purl = "pkg:generic/graalvm-jdk@17.0.9?arch=amd64"
140 | sha256 = "e47ba7229cef02393e19d5b8f46f7f1cab4829dd17bfe84d5431fc8ff0e22a96"
141 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-17.0.9.tar.gz"
142 | source-sha256 = "488b8d968a114f52606cab5e080b53d264e550c8f3e66993952363744df2b63e"
143 | stacks = ["*"]
144 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_linux-x64_bin.tar.gz"
145 | version = "17.0.9"
146 |
147 | [[metadata.dependencies.licenses]]
148 | type = "GPL-2.0 WITH Classpath-exception-2.0"
149 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
150 |
151 | [[metadata.dependencies]]
152 | cpes = ["cpe:2.3:a:oracle:jdk:21.0.2:*:*:*:*:*:*:*:*"]
153 | id = "jdk"
154 | name = "GraalVM for JDK"
155 | purl = "pkg:generic/graalvm-jdk@21.0.2?arch=amd64"
156 | sha256 = "b048069aaa3a99b84f5b957b162cc181a32a4330cbc35402766363c5be76ae48"
157 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-21.0.2.tar.gz"
158 | source-sha256 = "a99dfd8246c0e6cbbf756e76f301426ea58eeb85da1b172a566e2ba3e1583e5a"
159 | stacks = ["*"]
160 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz"
161 | version = "21.0.2"
162 |
163 | [[metadata.dependencies.licenses]]
164 | type = "GPL-2.0 WITH Classpath-exception-2.0"
165 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
166 |
167 | [[metadata.dependencies]]
168 | cpes = ["cpe:2.3:a:oracle:jdk:24.0.1:*:*:*:*:*:*:*:*"]
169 | id = "jdk"
170 | name = "GraalVM for JDK"
171 | purl = "pkg:generic/graalvm-jdk@24.0.1?arch=amd64"
172 | sha256 = "d2c544de672e400476a09c8f1da79ecc6b774a9441e234948542c3b3e6a84bde"
173 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-24.0.1.tar.gz"
174 | source-sha256 = "a29304d534f36aafe93a86d4ca9f17d2250e77095a75295c398f793483d4e2bf"
175 | stacks = ["*"]
176 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-24.0.1/graalvm-community-jdk-24.0.1_linux-x64_bin.tar.gz"
177 | version = "24.0.1"
178 |
179 | [[metadata.dependencies.licenses]]
180 | type = "GPL-2.0 WITH Classpath-exception-2.0"
181 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
182 |
183 | [[metadata.dependencies]]
184 | cpes = ["cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*:*"]
185 | id = "native-image-svm"
186 | name = "GraalVM for Native Image"
187 | purl = "pkg:generic/graalvm-jdk@17.0.9?arch=amd64"
188 | sha256 = "e47ba7229cef02393e19d5b8f46f7f1cab4829dd17bfe84d5431fc8ff0e22a96"
189 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-17.0.9.tar.gz"
190 | source-sha256 = "488b8d968a114f52606cab5e080b53d264e550c8f3e66993952363744df2b63e"
191 | stacks = ["*"]
192 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_linux-x64_bin.tar.gz"
193 | version = "17.0.9"
194 |
195 | [[metadata.dependencies.licenses]]
196 | type = "GPL-2.0 WITH Classpath-exception-2.0"
197 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
198 |
199 | [[metadata.dependencies]]
200 | cpes = ["cpe:2.3:a:oracle:jdk:21.0.2:*:*:*:*:*:*:*:*"]
201 | id = "native-image-svm"
202 | name = "GraalVM for Native Image"
203 | purl = "pkg:generic/graalvm-jdk@21.0.2?arch=amd64"
204 | sha256 = "b048069aaa3a99b84f5b957b162cc181a32a4330cbc35402766363c5be76ae48"
205 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-21.0.2.tar.gz"
206 | source-sha256 = "a99dfd8246c0e6cbbf756e76f301426ea58eeb85da1b172a566e2ba3e1583e5a"
207 | stacks = ["*"]
208 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz"
209 | version = "21.0.2"
210 |
211 | [[metadata.dependencies.licenses]]
212 | type = "GPL-2.0 WITH Classpath-exception-2.0"
213 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
214 |
215 | [[metadata.dependencies]]
216 | cpes = ["cpe:2.3:a:oracle:jdk:24.0.1:*:*:*:*:*:*:*:*"]
217 | id = "native-image-svm"
218 | name = "GraalVM for Native Image"
219 | purl = "pkg:generic/graalvm-jdk@24.0.1?arch=amd64"
220 | sha256 = "d2c544de672e400476a09c8f1da79ecc6b774a9441e234948542c3b3e6a84bde"
221 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-24.0.1.tar.gz"
222 | source-sha256 = "a29304d534f36aafe93a86d4ca9f17d2250e77095a75295c398f793483d4e2bf"
223 | stacks = ["*"]
224 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-24.0.1/graalvm-community-jdk-24.0.1_linux-x64_bin.tar.gz"
225 | version = "24.0.1"
226 |
227 | [[metadata.dependencies.licenses]]
228 | type = "GPL-2.0 WITH Classpath-exception-2.0"
229 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
230 |
231 | [[metadata.dependencies]]
232 | cpes = ["cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*:*"]
233 | id = "jdk"
234 | name = "GraalVM for JDK"
235 | purl = "pkg:generic/graalvm-jdk@17.0.9?arch=arm64"
236 | sha256 = "c3281b21f5220c2f76cf6fa0d646bc42e2d729af2c022bb06e557a613ba16102"
237 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-17.0.9.tar.gz"
238 | source-sha256 = "488b8d968a114f52606cab5e080b53d264e550c8f3e66993952363744df2b63e"
239 | stacks = ["*"]
240 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_linux-aarch64_bin.tar.gz"
241 | version = "17.0.9"
242 |
243 | [[metadata.dependencies.licenses]]
244 | type = "GPL-2.0 WITH Classpath-exception-2.0"
245 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
246 |
247 | [[metadata.dependencies]]
248 | cpes = ["cpe:2.3:a:oracle:jdk:21.0.2:*:*:*:*:*:*:*:*"]
249 | id = "jdk"
250 | name = "GraalVM for JDK"
251 | purl = "pkg:generic/graalvm-jdk@21.0.2?arch=arm64"
252 | sha256 = "a34be691ce68f0acf4655c7c6c63a9a49ed276a11859d7224fd94fc2f657cd7a"
253 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-21.0.2.tar.gz"
254 | source-sha256 = "a99dfd8246c0e6cbbf756e76f301426ea58eeb85da1b172a566e2ba3e1583e5a"
255 | stacks = ["*"]
256 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-aarch64_bin.tar.gz"
257 | version = "21.0.2"
258 |
259 | [[metadata.dependencies.licenses]]
260 | type = "GPL-2.0 WITH Classpath-exception-2.0"
261 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
262 |
263 | [[metadata.dependencies]]
264 | cpes = ["cpe:2.3:a:oracle:jdk:24.0.1:*:*:*:*:*:*:*:*"]
265 | id = "jdk"
266 | name = "GraalVM for JDK"
267 | purl = "pkg:generic/graalvm-jdk@24.0.1?arch=arm64"
268 | sha256 = "a3d1be8fadfb0d3df632252301f79a9b02b47e523da66539d370c62e683d762e"
269 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-24.0.1.tar.gz"
270 | source-sha256 = "a29304d534f36aafe93a86d4ca9f17d2250e77095a75295c398f793483d4e2bf"
271 | stacks = ["*"]
272 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-24.0.1/graalvm-community-jdk-24.0.1_linux-aarch64_bin.tar.gz"
273 | version = "24.0.1"
274 |
275 | [[metadata.dependencies.licenses]]
276 | type = "GPL-2.0 WITH Classpath-exception-2.0"
277 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
278 |
279 | [[metadata.dependencies]]
280 | cpes = ["cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*:*"]
281 | id = "native-image-svm"
282 | name = "GraalVM for Native Image"
283 | purl = "pkg:generic/graalvm-jdk@17.0.9?arch=arm64"
284 | sha256 = "c3281b21f5220c2f76cf6fa0d646bc42e2d729af2c022bb06e557a613ba16102"
285 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-17.0.9.tar.gz"
286 | source-sha256 = "488b8d968a114f52606cab5e080b53d264e550c8f3e66993952363744df2b63e"
287 | stacks = ["*"]
288 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_linux-aarch64_bin.tar.gz"
289 | version = "17.0.9"
290 |
291 | [[metadata.dependencies.licenses]]
292 | type = "GPL-2.0 WITH Classpath-exception-2.0"
293 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
294 |
295 | [[metadata.dependencies]]
296 | cpes = ["cpe:2.3:a:oracle:jdk:21.0.2:*:*:*:*:*:*:*:*"]
297 | id = "native-image-svm"
298 | name = "GraalVM for Native Image"
299 | purl = "pkg:generic/graalvm-jdk@21.0.2?arch=arm64"
300 | sha256 = "a34be691ce68f0acf4655c7c6c63a9a49ed276a11859d7224fd94fc2f657cd7a"
301 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-21.0.2.tar.gz"
302 | source-sha256 = "a99dfd8246c0e6cbbf756e76f301426ea58eeb85da1b172a566e2ba3e1583e5a"
303 | stacks = ["*"]
304 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-aarch64_bin.tar.gz"
305 | version = "21.0.2"
306 |
307 | [[metadata.dependencies.licenses]]
308 | type = "GPL-2.0 WITH Classpath-exception-2.0"
309 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
310 |
311 | [[metadata.dependencies]]
312 | cpes = ["cpe:2.3:a:oracle:jdk:24.0.1:*:*:*:*:*:*:*:*"]
313 | id = "native-image-svm"
314 | name = "GraalVM for Native Image"
315 | purl = "pkg:generic/graalvm-jdk@24.0.1?arch=arm64"
316 | sha256 = "a3d1be8fadfb0d3df632252301f79a9b02b47e523da66539d370c62e683d762e"
317 | source = "https://github.com/graalvm/graalvm-ce-builds/archive/refs/tags/jdk-24.0.1.tar.gz"
318 | source-sha256 = "a29304d534f36aafe93a86d4ca9f17d2250e77095a75295c398f793483d4e2bf"
319 | stacks = ["*"]
320 | uri = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-24.0.1/graalvm-community-jdk-24.0.1_linux-aarch64_bin.tar.gz"
321 | version = "24.0.1"
322 |
323 | [[metadata.dependencies.licenses]]
324 | type = "GPL-2.0 WITH Classpath-exception-2.0"
325 | uri = "https://openjdk.java.net/legal/gplv2+ce.html"
326 |
327 | [[stacks]]
328 | id = "*"
329 |
330 | [[targets]]
331 | arch = "amd64"
332 | os = "linux"
333 |
334 | [[targets]]
335 | arch = "arm64"
336 | os = "linux"
337 |
--------------------------------------------------------------------------------
/cmd/main/main.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package main
18 |
19 | import (
20 | "os"
21 |
22 | "github.com/paketo-buildpacks/libjvm"
23 | "github.com/paketo-buildpacks/libjvm/helper"
24 | "github.com/paketo-buildpacks/libpak"
25 | "github.com/paketo-buildpacks/libpak/bard"
26 | )
27 |
28 | func main() {
29 | logger := bard.NewLogger(os.Stdout)
30 |
31 | // not used directly, but this forces the helper module to be included in the module
32 | // we need the helper module because of the way that `scripts/build/sh` builds the helper cmd
33 | _ = helper.ActiveProcessorCount{Logger: logger}
34 |
35 | libpak.Main(
36 | libjvm.Detect{},
37 | libjvm.NewBuild(logger, libjvm.WithNativeImage(
38 | libjvm.NativeImage{
39 | BundledWithJDK: true,
40 | })),
41 | )
42 | }
43 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/paketo-buildpacks/graalvm/v7
2 |
3 | go 1.24
4 |
5 | require (
6 | github.com/paketo-buildpacks/libjvm v1.46.0
7 | github.com/paketo-buildpacks/libpak v1.73.0
8 | )
9 |
10 | require (
11 | github.com/BurntSushi/toml v1.5.0 // indirect
12 | github.com/Masterminds/semver/v3 v3.3.1 // indirect
13 | github.com/buildpacks/libcnb v1.30.4 // indirect
14 | github.com/creack/pty v1.1.24 // indirect
15 | github.com/h2non/filetype v1.1.3 // indirect
16 | github.com/heroku/color v0.0.6 // indirect
17 | github.com/imdario/mergo v0.3.16 // indirect
18 | github.com/magiconair/properties v1.8.10 // indirect
19 | github.com/mattn/go-colorable v0.1.14 // indirect
20 | github.com/mattn/go-isatty v0.0.20 // indirect
21 | github.com/mattn/go-shellwords v1.0.12 // indirect
22 | github.com/miekg/dns v1.1.65 // indirect
23 | github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
24 | github.com/onsi/gomega v1.37.0 // indirect
25 | github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 // indirect
26 | github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
27 | golang.org/x/crypto v0.37.0 // indirect
28 | golang.org/x/mod v0.24.0 // indirect
29 | golang.org/x/net v0.39.0 // indirect
30 | golang.org/x/sync v0.13.0 // indirect
31 | golang.org/x/sys v0.32.0 // indirect
32 | golang.org/x/tools v0.32.0 // indirect
33 | software.sslmate.com/src/go-pkcs12 v0.5.0 // indirect
34 | )
35 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
2 | github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
3 | github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
4 | github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
5 | github.com/buildpacks/libcnb v1.30.4 h1:Jp6cJxYsZQgqix+lpRdSpjHt5bv5yCJqgkw9zWmS6xU=
6 | github.com/buildpacks/libcnb v1.30.4/go.mod h1:vjEDAlK3/Rf67AcmBzphXoqIlbdFgBNUK5d8wjreJbY=
7 | github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
8 | github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
9 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
10 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
11 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
12 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
13 | github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg=
14 | github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
15 | github.com/heroku/color v0.0.6 h1:UTFFMrmMLFcL3OweqP1lAdp8i1y/9oHqkeHjQ/b/Ny0=
16 | github.com/heroku/color v0.0.6/go.mod h1:ZBvOcx7cTF2QKOv4LbmoBtNl5uB17qWxGuzZrsi1wLU=
17 | github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
18 | github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
19 | github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww=
20 | github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
21 | github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
22 | github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
23 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
24 | github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
25 | github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
26 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
27 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
28 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
29 | github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
30 | github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
31 | github.com/miekg/dns v1.1.65 h1:0+tIPHzUW0GCge7IiK3guGP57VAw7hoPDfApjkMD1Fc=
32 | github.com/miekg/dns v1.1.65/go.mod h1:Dzw9769uoKVaLuODMDZz9M6ynFU6Em65csPuoi8G0ck=
33 | github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
34 | github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
35 | github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y=
36 | github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
37 | github.com/paketo-buildpacks/libjvm v1.46.0 h1:+mEOsK30a1if0T3ZvSs6di/w5cp/j14uD3DyYUusavI=
38 | github.com/paketo-buildpacks/libjvm v1.46.0/go.mod h1:jNQuS8SQfbbHN9kenMpBhpxaE0uCa9ZkKLrN89IU0VY=
39 | github.com/paketo-buildpacks/libpak v1.73.0 h1:OgdkOn4VLIzRo0WcSx1iRmqeLrcMAZbIk7pOOJSyl5Q=
40 | github.com/paketo-buildpacks/libpak v1.73.0/go.mod h1:EY01BAEtNPT1kI+/OTGTAkitNzKiFzCTGAmxapBUPJ4=
41 | github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 h1:2nosf3P75OZv2/ZO/9Px5ZgZ5gbKrzA3joN1QMfOGMQ=
42 | github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0/go.mod h1:lAVhWwbNaveeJmxrxuSTxMgKpF6DjnuVpn6T8WiBwYQ=
43 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
45 | github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
46 | github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
47 | github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
48 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
49 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
50 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
51 | github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
52 | github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
53 | golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
54 | golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
55 | golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
56 | golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
57 | golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
58 | golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
59 | golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
60 | golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
61 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
62 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
63 | golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
64 | golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
65 | golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
66 | golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
67 | golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU=
68 | golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s=
69 | google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
70 | google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
71 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
72 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
73 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
74 | software.sslmate.com/src/go-pkcs12 v0.5.0 h1:EC6R394xgENTpZ4RltKydeDUjtlM5drOYIG9c6TVj2M=
75 | software.sslmate.com/src/go-pkcs12 v0.5.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI=
76 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euo pipefail
3 |
4 | GOMOD=$(head -1 go.mod | awk '{print $2}')
5 | GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o "linux/amd64/bin/helper" "github.com/paketo-buildpacks/libjvm/cmd/helper"
6 | GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o "linux/arm64/bin/helper" "github.com/paketo-buildpacks/libjvm/cmd/helper"
7 | GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main"
8 | GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main"
9 |
10 | if [ "${STRIP:-false}" != "false" ]; then
11 | strip linux/amd64/bin/helper linux/arm64/bin/helper
12 | strip linux/amd64/bin/main linux/arm64/bin/main
13 | fi
14 |
15 | if [ "${COMPRESS:-none}" != "none" ]; then
16 | $COMPRESS linux/amd64/bin/helper linux/arm64/bin/helper
17 | $COMPRESS linux/amd64/bin/main linux/arm64/bin/main
18 | fi
19 |
20 | ln -fs main linux/amd64/bin/build
21 | ln -fs main linux/arm64/bin/build
22 | ln -fs main linux/amd64/bin/detect
23 | ln -fs main linux/arm64/bin/detect
--------------------------------------------------------------------------------
/scripts/update-buildpack-dependency.sh:
--------------------------------------------------------------------------------
1 | sha256() {
2 | if [[ "${DEPENDENCY}" == "jdk" ]]; then
3 | shasum -a 256 "${ROOT}"/dependency/graalvm-ce-java*-linux-amd64-*.tar.gz | cut -f 1 -d ' '
4 | elif [[ "${DEPENDENCY}" == "native-image-svm" ]]; then
5 | shasum -a 256 "${ROOT}"/dependency/native-image-installable-svm-java*-linux-amd64-*.jar | cut -f 1 -d ' '
6 | else
7 | cat "${ROOT}"/dependency/sha256
8 | fi
9 | }
10 |
11 | uri() {
12 | if [[ "${DEPENDENCY}" == "jdk" ]]; then
13 | echo "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$(cat "${ROOT}"/dependency/version)/$(basename "${ROOT}"/dependency/graalvm-ce-java*-linux-amd64-*.tar.gz)"
14 | elif [[ "${DEPENDENCY}" == "native-image-svm" ]]; then
15 | echo "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$(cat "${ROOT}"/dependency/version)/$(basename "${ROOT}"/dependency/native-image-installable-svm-java*-linux-amd64-*.jar)"
16 | else
17 | cat "${ROOT}"/dependency/uri
18 | fi
19 | }
20 |
21 | version() {
22 | if [[ "${DEPENDENCY}" == "jdk" || "${DEPENDENCY}" == "native-image-svm" ]]; then
23 | local PATTERN='JAVA_VERSION="([0-9]+)\.?([0-9]*)\.?([0-9]*)_?([0-9]+)?"'
24 |
25 | if [[ $(tar xOz --wildcards --no-recursion -f "${ROOT}"/dependency/graalvm-ce-java*-linux-amd64-*.tar.gz 'graalvm-ce-java*/release' | grep JAVA_VERSION) =~ ${PATTERN} ]]; then
26 | if [[ "${BASH_REMATCH[1]}" = "1" ]]; then
27 | echo "${BASH_REMATCH[2]}.${BASH_REMATCH[3]}.${BASH_REMATCH[4]}"
28 | return
29 | else
30 | echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
31 | return
32 | fi
33 | else
34 | echo "version is not semver" 1>&2
35 | exit 1
36 | fi
37 | else
38 | local PATTERN="([0-9]+)\.?([0-9]*)\.?([0-9]*)(.*)"
39 |
40 | if [[ $(cat "${ROOT}"/dependency/version) =~ ${PATTERN} ]]; then
41 | echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
42 | return
43 | else
44 | echo "version is not semver" 1>&2
45 | exit 1
46 | fi
47 | fi
48 | }
49 |
--------------------------------------------------------------------------------