From 464e5fb4b2a001469d2c9110a02ea27870cc5838 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 18 Jan 2021 23:17:11 +0200 Subject: [PATCH] Added a new node version --- app/config/environments.php | 10 +++++++++- docker/environments/build.sh | 3 +++ docker/environments/node-15.6/Dockerfile | 9 +++++++++ .../Services/Functions/FunctionsCustomServerTest.php | 8 ++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 docker/environments/node-15.6/Dockerfile diff --git a/app/config/environments.php b/app/config/environments.php index 228e7e4608..ebd24b675c 100644 --- a/app/config/environments.php +++ b/app/config/environments.php @@ -3,7 +3,7 @@ * List of Appwrite Cloud Functions supported environments */ return [ - 'node-14' => [ + 'node-14.5' => [ 'name' => 'Node.js', 'version' => '14.5', 'base' => 'node:14.5-alpine', @@ -11,6 +11,14 @@ return [ 'build' => '/usr/src/code/docker/environments/node-14.5', 'logo' => 'node.png', ], + 'node-15.6' => [ + 'name' => 'Node.js', + 'version' => '15.6', + 'base' => 'node:14.5-alpine', + 'image' => 'appwrite/env-node-15.6:1.0.0', + 'build' => '/usr/src/code/docker/environments/node-15.6', + 'logo' => 'node.png', + ], 'php-7.4' => [ 'name' => 'PHP', 'version' => '7.4', diff --git a/docker/environments/build.sh b/docker/environments/build.sh index 0dc07947a8..ace0ece1e4 100644 --- a/docker/environments/build.sh +++ b/docker/environments/build.sh @@ -9,6 +9,9 @@ docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 echo 'Node 14.5...' docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-14.5:1.0.0 ./docker/environments/node-14.5/ --push +echo 'Node 15.6...' +docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-15.6:1.0.0 ./docker/environments/node-15.6/ --push + echo 'PHP 7.4...' docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-php-7.4:1.0.0 ./docker/environments/php-7.4/ --push diff --git a/docker/environments/node-15.6/Dockerfile b/docker/environments/node-15.6/Dockerfile new file mode 100644 index 0000000000..7cb1860fce --- /dev/null +++ b/docker/environments/node-15.6/Dockerfile @@ -0,0 +1,9 @@ +FROM node:15.6-alpine + +LABEL maintainer="team@appwrite.io" + +RUN apk add tar + +RUN mkdir /usr/local/src + +WORKDIR /usr/local/src/ \ No newline at end of file diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 377d728e11..f309a0f1d6 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -513,6 +513,14 @@ class FunctionsCustomServerTest extends Scope 'command' => 'node index.js', 'timeout' => 15, ], + [ + 'language' => 'Node.js', + 'version' => '15.6', + 'name' => 'node-15.6', + 'code' => $functions.'/node.tar.gz', + 'command' => 'node index.js', + 'timeout' => 15, + ], [ 'language' => 'Ruby', 'version' => '2.7',