From 20513c886440b88f258cde794e4b307a01cc0810 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Wed, 19 Apr 2023 03:19:57 +0900 Subject: [PATCH] Add nodejs20 Signed-off-by: Sora Morimoto --- BUILD | 1 + README.md | 2 ++ SUPPORT_POLICY.md | 2 +- node_archives.bzl | 20 ++++++++++++++++++++ nodejs/BUILD | 2 +- nodejs/README.md | 1 + nodejs/testdata/nodejs20.yaml | 6 ++++++ 7 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 nodejs/testdata/nodejs20.yaml diff --git a/BUILD b/BUILD index bba355db4..cd86440ac 100644 --- a/BUILD +++ b/BUILD @@ -199,6 +199,7 @@ NODEJS_VERSIONS = [ "14", "16", "18", + "20", ] NODEJS_VARIATIONS = [ diff --git a/README.md b/README.md index 3efdb2aba..1409fa6c8 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The following images are currently published and updated by the distroless proje | gcr.io/distroless/nodejs14-debian11 | latest, nonroot, debug, debug-nonroot | | gcr.io/distroless/nodejs16-debian11 | latest, nonroot, debug, debug-nonroot | | gcr.io/distroless/nodejs18-debian11 | latest, nonroot, debug, debug-nonroot | +| gcr.io/distroless/nodejs20-debian11 | latest, nonroot, debug, debug-nonroot | Any other tags are considered deprecated and are no longer updated @@ -104,6 +105,7 @@ Follow these steps to get started: * [gcr.io/distroless/nodejs14-debian11](nodejs/README.md) * [gcr.io/distroless/nodejs16-debian11](nodejs/README.md) * [gcr.io/distroless/nodejs18-debian11](nodejs/README.md) + * [gcr.io/distroless/nodejs20-debian11](nodejs/README.md) * The following images are also published on `gcr.io`, but are considered experimental and not recommended for production usage: * [gcr.io/distroless/python3-debian11](experimental/python3/README.md) diff --git a/SUPPORT_POLICY.md b/SUPPORT_POLICY.md index 6df3fd738..3d628bdec 100644 --- a/SUPPORT_POLICY.md +++ b/SUPPORT_POLICY.md @@ -21,7 +21,7 @@ The current estimation of end of life for images with the pattern: Java will only support current LTS version distributed by debian [see here](https://wiki.debian.org/Java). ### Node -Node version support is for even numbered releases (14, 16, 18, etc) that are current, active or in LTS maintenance. For more information, [see here](https://nodejs.org/en/about/releases/). +Node version support is for even numbered releases (14, 16, 18, 20, etc) that are current, active or in LTS maintenance. For more information, [see here](https://nodejs.org/en/about/releases/). ### Python Python support is experimental, and this project does not make any guarantees about the version of python in images. diff --git a/node_archives.bzl b/node_archives.bzl index eae7c0503..45f2053ca 100644 --- a/node_archives.bzl +++ b/node_archives.bzl @@ -33,6 +33,16 @@ def repositories(): control = "//nodejs:control", ) + node_archive( + name = "nodejs20_amd64", + sha256 = "95439a0a836fc858565c7b6a7b1e55d1741901e6f205485e496abbefe973cfce", + strip_prefix = "node-v20.0.0-linux-x64/", + urls = ["https://nodejs.org/dist/v20.0.0/node-v20.0.0-linux-x64.tar.gz"], + version = "20.0.0", + architecture = "amd64", + control = "//nodejs:control", + ) + node_archive( name = "nodejs14_arm64", sha256 = "044b7ec3fea04cd3815d26901ee37203dcc942688b72ee6eac96f6a1ca3cc63f", @@ -62,3 +72,13 @@ def repositories(): architecture = "arm64", control = "//nodejs:control", ) + + node_archive( + name = "nodejs20_arm64", + sha256 = "997ddc7ca941280aeb357d4ad40ea7f93cb4d7989b93056dbf1b42a1a89b449b", + strip_prefix = "node-v20.0.0-linux-arm64/", + urls = ["https://nodejs.org/dist/v20.0.0/node-v20.0.0-linux-arm64.tar.gz"], + version = "20.0.0", + architecture = "arm64", + control = "//nodejs:control", + ) diff --git a/nodejs/BUILD b/nodejs/BUILD index e4937823e..6b3643a73 100644 --- a/nodejs/BUILD +++ b/nodejs/BUILD @@ -5,7 +5,7 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar") package(default_visibility = ["//visibility:public"]) -NODEJS_MAJOR_VERISONS = ("14", "16", "18") +NODEJS_MAJOR_VERISONS = ("14", "16", "18", "20") MODE = [ "", diff --git a/nodejs/README.md b/nodejs/README.md index 2e07fc903..a1cf22773 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -9,6 +9,7 @@ Specifically, these images contain everything in the [base image](../base/README - Node.js v14 (`gcr.io/distroless/nodejs14-debian11`) and its dependencies. - Node.js v16 (`gcr.io/distroless/nodejs16-debian11`) and its dependencies. - Node.js v18 (`gcr.io/distroless/nodejs18-debian11`) and its dependencies. +- Node.js v20 (`gcr.io/distroless/nodejs20-debian11`) and its dependencies. ## Usage diff --git a/nodejs/testdata/nodejs20.yaml b/nodejs/testdata/nodejs20.yaml new file mode 100644 index 000000000..879d5024c --- /dev/null +++ b/nodejs/testdata/nodejs20.yaml @@ -0,0 +1,6 @@ +schemaVersion: "2.0.0" +commandTests: + - name: nodejs + command: "/nodejs/bin/node" + args: ["--version"] + expectedOutput: ["v20.0.0"]