dist: Support Tencent Kona JDK#672
Conversation
9871695 to
a8506e9
Compare
|
I just refreshed the commit. |
a8506e9 to
8549eb9
Compare
|
I just updated the commit again, and the file conflicts are resolved. |
41ce0ca to
109744b
Compare
Signed-off-by: John Jiang <johnsjiang@tencent.com>
109744b to
08f4b36
Compare
Signed-off-by: John Jiang <johnsjiang@tencent.com>
08f4b36 to
38b6474
Compare
Signed-off-by: John Jiang <johnsjiang@tencent.com>
38b6474 to
8b5e418
Compare
Signed-off-by: John Jiang <johnsjiang@tencent.com>
8b5e418 to
e003e7e
Compare
Signed-off-by: John Jiang <johnsjiang@tencent.com>
e003e7e to
6dd1e44
Compare
|
I already executed But |
Signed-off-by: John Jiang <johnsjiang@tencent.com>
|
Linking the tracking issue: this PR implements #671 (Tencent Kona JDK support). Maintainers — adding |
Signed-off-by: John Jiang <johnsjiang@tencent.com>
6dd1e44 to
59e214a
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for the Tencent Kona JDK distribution to actions/setup-java, including the installer implementation, documentation, and test/e2e coverage.
Changes:
- Add a new
KonaDistributionthat resolves Kona JDK downloads from the publishedkona-v1.jsonconfiguration. - Register the new
konadistribution in the distribution factory and bundleddistoutput. - Update docs, e2e matrix, and add unit tests + fixture manifest data for Kona.
Show a summary per file
| File | Description |
|---|---|
src/distributions/kona/models.ts |
Adds Kona release/config TypeScript models. |
src/distributions/kona/installer.ts |
Implements Kona distribution resolution and download/extract logic. |
src/distributions/distribution-factory.ts |
Registers kona as a supported distribution and wires installer creation. |
README.md |
Documents kona as a supported distribution and links to advanced usage. |
docs/advanced-usage.md |
Adds a “Tencent Kona” usage section and TOC entry. |
__tests__/distributors/kona-installer.test.ts |
Adds unit tests for Kona release selection and error cases. |
__tests__/data/kona.json |
Adds fixture manifest data used by the Kona unit tests. |
.github/workflows/e2e-versions.yml |
Adds kona to the e2e distribution matrix. |
dist/setup/index.js |
Updates the bundled action output to include the new Kona installer. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/9 changed files
- Comments generated: 5
| const availableReleases = await this.getAvailableReleases(); | ||
| const releases = availableReleases | ||
| .filter(item => { | ||
| return isVersionSatisfies(version, item.version); | ||
| }) | ||
| .map(item => { | ||
| return { | ||
| version: item.version, | ||
| url: item.downloadUrl | ||
| } as JavaDownloadRelease; | ||
| }); | ||
|
|
||
| if (!releases.length) { | ||
| throw new Error( | ||
| `No Kona release for the specified version "${version}" on OS "${this.getOs()}" and arch "${this.getArch()}".` | ||
| ); | ||
| } | ||
|
|
||
| return releases[0]; | ||
| } |
| import fs from 'fs'; | ||
| import path from 'path'; | ||
|
|
| import { | ||
| extractJdkFile, | ||
| getDownloadArchiveExtension, | ||
| isVersionSatisfies | ||
| } from '../../util'; |
| const javaArchivePath = await tc.downloadTool(javaRelease.url); | ||
|
|
||
| core.info(`Extracting Java archive...`); | ||
|
|
||
| const extension = getDownloadArchiveExtension(); | ||
| const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); |
| if (core.isDebug()) { | ||
| console.time('Retrieving available releases for Kona took'); // eslint-disable-line no-console | ||
| } | ||
|
|
||
| const releaseInfo = await this.fetchReleaseInfo(); | ||
| if (!releaseInfo) { | ||
| throw new Error(`Couldn't fetch Kona release information`); | ||
| } | ||
|
|
||
| const availableReleases = this.chooseReleases( | ||
| this.getOs(), | ||
| this.getArch(), | ||
| releaseInfo | ||
| ); | ||
|
|
||
| if (core.isDebug()) { | ||
| core.startGroup('Print information about available releases'); | ||
| core.debug(availableReleases.map(item => item.version).join(', ')); | ||
| core.endGroup(); | ||
| } |
Signed-off-by: John Jiang <johnsjiang@tencent.com>
59e214a to
39f01ea
Compare
|
@brunoborges |
Description:
This PR adds Tencent Kona JDK into setup-java.
It supports the major versions 8, 11, 17 and 21.
The supported platforms are Linux x86_64/aarch64, macOS x86_64/aarch64 and Windows x86_64.
Currently, only the latest stable releases are supported, and only jdk (no jre) binaries are available.
A configuration maintains these releases.
Related issue:
#671
Check list: