Skip to content

Commit

Permalink
improvement(jib): supported jdk 17 lts version
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Sep 6, 2022
1 parent 75ed164 commit 3f3c91f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference/module-types/jib-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ The JDK version to use.

| Type | Allowed Values | Default | Required |
| -------- | -------------- | ------- | -------- |
| `number` | 8, 11, 13 | `11` | Yes |
| `number` | 8, 11, 13, 17 | `11` | Yes |

### `build.dockerBuild`

Expand Down
2 changes: 1 addition & 1 deletion plugins/jib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const jibModuleSchema = () =>
The type of project to build. Defaults to auto-detecting between gradle and maven (based on which files/directories are found in the module root), but in some cases you may need to specify it.
`
),
jdkVersion: joi.number().integer().valid(8, 11, 13).default(11).description("The JDK version to use."),
jdkVersion: joi.number().integer().valid(8, 11, 13, 17).default(11).description("The JDK version to use."),
dockerBuild: joi
.boolean()
.default(false)
Expand Down
39 changes: 39 additions & 0 deletions plugins/jib/openjdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import { posix } from "path"
const jdk8Version = "jdk8u292-b10"
const jdk11Version = "jdk-11.0.9.1+1"
const jdk13Version = "jdk-13+33"
const jdk17Version = "jdk-17.0.4.1+1"

const jdk8Base = `https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/${jdk8Version}/`
const jdk11Base = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/"
const jdk13Base = "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/"
const jdk17Base = "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/"

export const openJdkSpecs: any = [
{
Expand Down Expand Up @@ -130,4 +132,41 @@ export const openJdkSpecs: any = [
},
],
},
{
name: "openjdk-17",
description: "The OpenJDK 17 library.",
type: "library",
builds: [
{
platform: "darwin",
architecture: "amd64",
url: jdk17Base + "OpenJDK17U-jdk_x64_mac_hotspot_17.0.4.1_1.tar.gz",
sha256: "ac21a5a87f7cfa00212ab7c41f7eb80ca33640d83b63ad850be811c24095d61a",
extract: {
format: "tar",
targetPath: posix.join(jdk17Version, "Contents", "Home"),
},
},
{
platform: "linux",
architecture: "amd64",
url: jdk17Base + "OpenJDK17U-jdk_x64_linux_hotspot_17.0.4.1_1.tar.gz",
sha256: "5fbf8b62c44f10be2efab97c5f5dbf15b74fae31e451ec10abbc74e54a04ff44",
extract: {
format: "tar",
targetPath: jdk17Version,
},
},
{
platform: "windows",
architecture: "amd64",
url: jdk17Base + "OpenJDK17U-jdk_x64_windows_hotspot_17.0.4.1_1.zip",
sha256: "3860d2ed7405674baeb0f9f4c71377421716759fe4301e92bdd4dd43c0442dc3",
extract: {
format: "zip",
targetPath: jdk17Version,
},
},
],
},
]

0 comments on commit 3f3c91f

Please sign in to comment.