From ed90bc1d2463a33eed2e83d42f4ede95b0f17bb2 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 29 Mar 2021 12:49:42 +0545 Subject: [PATCH] deno 1.8 function env --- app/config/environments.php | 9 +++++++++ docker/environments/build.sh | 3 +++ docker/environments/deno-1.8/Dockerfile | 11 +++++++++++ .../Services/Functions/FunctionsCustomServerTest.php | 8 ++++++++ 4 files changed, 31 insertions(+) create mode 100644 docker/environments/deno-1.8/Dockerfile diff --git a/app/config/environments.php b/app/config/environments.php index 9f1c5638e1..0ae25ac5d1 100644 --- a/app/config/environments.php +++ b/app/config/environments.php @@ -97,6 +97,15 @@ $environments = [ 'logo' => 'deno.png', 'supports' => [System::X86, System::PPC, System::ARM], ], + 'deno-1.8' => [ + 'name' => 'Deno', + 'version' => '1.8', + 'base' => 'hayd/deno:alpine-1.8.2', + 'image' => 'appwrite/env-deno-1.8:1.0.0', + 'build' => '/usr/src/code/docker/environments/deno-1.6', + 'logo' => 'deno.png', + 'supports' => [System::X86, System::PPC, System::ARM], + ], 'dart-2.10' => [ 'name' => 'Dart', 'version' => '2.10', diff --git a/docker/environments/build.sh b/docker/environments/build.sh index 1543c5814d..50cc19f8e9 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 'Deno 1.6...' docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-deno-1.6:1.0.0 ./docker/environments/deno-1.6/ --push +echo 'Deno 1.8...' +docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-deno-1.8:1.0.0 ./docker/environments/deno-1.8/ --push + 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 diff --git a/docker/environments/deno-1.8/Dockerfile b/docker/environments/deno-1.8/Dockerfile new file mode 100644 index 0000000000..b07df9f785 --- /dev/null +++ b/docker/environments/deno-1.8/Dockerfile @@ -0,0 +1,11 @@ +FROM hayd/deno:alpine-1.8.2 + +LABEL maintainer="team@appwrite.io" + +RUN apk add tar + +RUN mkdir /usr/local/src + +WORKDIR /usr/local/src/ + +ENV DENO_DIR=/usr/local/src/.appwrite \ No newline at end of file diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index b04a635cf0..7f152a8df1 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -533,6 +533,14 @@ class FunctionsCustomServerTest extends Scope 'command' => 'deno run --allow-env index.ts', 'timeout' => 15, ], + [ + 'language' => 'Deno', + 'version' => '1.8', + 'name' => 'deno-1.8', + 'code' => $functions.'/deno.tar.gz', + 'command' => 'deno run --allow-env index.ts', + 'timeout' => 15, + ], [ 'language' => 'Dart', 'version' => '2.10',