diff --git a/.travis.yml b/.travis.yml index f51de1e8ab..8406222a16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ script: deploy: - provider: script edge: true - script: ./deploy.sh + script: ./.travis-ci/deploy.sh on: repo: appwrite/appwrite branch: deploy diff --git a/app/config/environments.php b/app/config/environments.php index 228e7e4608..8e2efac098 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.5' => [ + 'name' => 'Node.js', + 'version' => '15.5', + 'base' => 'node:15.5-alpine', + 'image' => 'appwrite/env-node-15.5:1.0.0', + 'build' => '/usr/src/code/docker/environments/node-15.5', + 'logo' => 'node.png', + ], 'php-7.4' => [ 'name' => 'PHP', 'version' => '7.4', diff --git a/app/workers/functions.php b/app/workers/functions.php index 2712dc74f1..cc276ed522 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -34,7 +34,7 @@ Co\run(function() use ($environments) { // Warmup: make sure images are ready t $stdout = ''; $stderr = ''; - Console::info('Warming up '.$environment['name'].' environment...'); + Console::info('Warming up '.$environment['name'].' '.$environment['version'].' environment...'); Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr); diff --git a/docker/environments/build.sh b/docker/environments/build.sh index 0dc07947a8..a1ce4fa19c 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.5...' +docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-15.5:1.0.0 ./docker/environments/node-15.5/ --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.5/Dockerfile b/docker/environments/node-15.5/Dockerfile new file mode 100644 index 0000000000..823862bc12 --- /dev/null +++ b/docker/environments/node-15.5/Dockerfile @@ -0,0 +1,9 @@ +FROM node:15.5-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..10757e75cc 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -508,7 +508,15 @@ class FunctionsCustomServerTest extends Scope [ 'language' => 'Node.js', 'version' => '14.5', - 'name' => 'node-14', + 'name' => 'node-14.5', + 'code' => $functions.'/node.tar.gz', + 'command' => 'node index.js', + 'timeout' => 15, + ], + [ + 'language' => 'Node.js', + 'version' => '15.5', + 'name' => 'node-15.5', 'code' => $functions.'/node.tar.gz', 'command' => 'node index.js', 'timeout' => 15,