- Add nodejs:14 to docs/build etc.
- Add test suite for node 14.
- Add docker action test.
diff --git a/.travis.yml b/.travis.yml
index 21f96db..7935023 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@
all_branches: true
repo: apache/openwhisk-runtime-nodejs
- provider: script
- script: "./tools/travis/publish.sh openwhisk 8 nightly && ./tools/travis/publish.sh openwhisk 10 nightly && ./tools/travis/publish.sh openwhisk 12 nightly"
+ script: "./tools/travis/publish.sh openwhisk 8 nightly && ./tools/travis/publish.sh openwhisk 10 nightly && ./tools/travis/publish.sh openwhisk 12 nightly && ./tools/travis/publish.sh openwhisk 14 nightly"
on:
branch: master
repo: apache/openwhisk-runtime-nodejs
diff --git a/README.md b/README.md
index 595f2df..1aaf261 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@
- Node.js 8.16.1 (`nodejs:8` & `openwhisk/action-nodejs-v8`)
- Node.js 10.16.3 (`nodejs:10` & `openwhisk/action-nodejs-v10`)
- Node.js 12.8.1 (`nodejs:12` & `openwhisk/action-nodejs-v12`)
+- Node.js 14.2.0 (`nodejs:14` & `openwhisk/action-nodejs-v14`)
This README documents the build, customisation and testing of these runtime images.
@@ -56,6 +57,12 @@
wsk action update myAction myAction.js --kind nodejs:12
```
+### Node.js v14
+
+```
+wsk action update myAction myAction.js --kind nodejs:14
+```
+
## Images
All the runtime images are published by the project to Docker Hub @ [https://hub.docker.com/u/openwhisk](https://hub.docker.com/u/openwhisk)
@@ -63,6 +70,7 @@
- [https://hub.docker.com/r/openwhisk/action-nodejs-v8](https://hub.docker.com/r/openwhisk/action-nodejs-v8)
- [https://hub.docker.com/r/openwhisk/action-nodejs-v10](https://hub.docker.com/r/openwhisk/action-nodejs-v10)
- [https://hub.docker.com/r/openwhisk/action-nodejs-v12](https://hub.docker.com/r/openwhisk/action-nodejs-v12)
+- [https://hub.docker.com/r/openwhisk/action-nodejs-v14](https://hub.docker.com/r/openwhisk/action-nodejs-v14)
These images can be used to execute Node.js actions on any deployment of Apache OpenWhisk, even those without those images defined the in runtime manifest, using the `--docker` action parameter.
@@ -92,9 +100,10 @@
./gradlew core:nodejs8Action:distDocker
./gradlew core:nodejs10Action:distDocker
./gradlew core:nodejs12Action:distDocker
+./gradlew core:nodejs14Action:distDocker
```
-This will return the following runtime images with the following names: `action-nodejs-v8`, `action-nodejs-v10` and `action-nodejs-v12`.
+This will return the following runtime images with the following names: `action-nodejs-v8`, `action-nodejs-v10`, `action-nodejs-v12` and `action-nodejs-v14`.
### Testing
@@ -113,6 +122,7 @@
./gradlew tests:dat:docker:nodejs8docker:distDocker
./gradlew tests:dat:docker:nodejs10docker:distDocker
./gradlew tests:dat:docker:nodejs12docker:distDocker
+./gradlew tests:dat:docker:nodejs14docker:distDocker
```
- Run the project tests.
diff --git a/settings.gradle b/settings.gradle
index d688219..9917e22 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -21,10 +21,12 @@
include 'core:nodejs8Action'
include 'core:nodejs10Action'
include 'core:nodejs12Action'
+include 'core:nodejs14Action'
include 'core:typescript37Action'
include 'tests:dat:docker:nodejs8docker'
include 'tests:dat:docker:nodejs10docker'
include 'tests:dat:docker:nodejs12docker'
+include 'tests:dat:docker:nodejs14docker'
include 'tests:dat:docker:typescript37docker'
rootProject.name = 'runtime-nodejs'
diff --git a/tests/dat/docker/nodejs14docker/Dockerfile b/tests/dat/docker/nodejs14docker/Dockerfile
new file mode 100644
index 0000000..a679436
--- /dev/null
+++ b/tests/dat/docker/nodejs14docker/Dockerfile
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+FROM action-nodejs-v14
+COPY package.json .
+RUN npm install --production
diff --git a/tests/dat/docker/nodejs14docker/build.gradle b/tests/dat/docker/nodejs14docker/build.gradle
new file mode 100644
index 0000000..222f81b
--- /dev/null
+++ b/tests/dat/docker/nodejs14docker/build.gradle
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ext.dockerImageName = 'nodejs14docker'
+apply from: '../../../../gradle/docker.gradle'
diff --git a/tests/dat/docker/nodejs14docker/package.json b/tests/dat/docker/nodejs14docker/package.json
new file mode 100644
index 0000000..6822c09
--- /dev/null
+++ b/tests/dat/docker/nodejs14docker/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "testdocker",
+ "version": "1.0.0",
+ "main": "index.js",
+ "dependencies": {
+ "openwhisk": "2.0.0"
+ }
+}
diff --git a/tests/src/test/scala/runtime/actionContainers/NodeJs10ConcurrentTests.scala b/tests/src/test/scala/runtime/actionContainers/NodeJs10ConcurrentTests.scala
index bb59241..ffb3108 100644
--- a/tests/src/test/scala/runtime/actionContainers/NodeJs10ConcurrentTests.scala
+++ b/tests/src/test/scala/runtime/actionContainers/NodeJs10ConcurrentTests.scala
@@ -23,5 +23,5 @@
@RunWith(classOf[JUnitRunner])
class NodeJs10ConcurrentTests extends NodeJsConcurrentTests {
override lazy val nodejsContainerImageName = "action-nodejs-v10"
- override lazy val nodejsTestDockerImageName = "nodejs8docker"
+ override lazy val nodejsTestDockerImageName = "nodejs10docker"
}
diff --git a/tests/src/test/scala/runtime/actionContainers/NodeJs12ConcurrentTests.scala b/tests/src/test/scala/runtime/actionContainers/NodeJs12ConcurrentTests.scala
index a49972c..e3414c4 100644
--- a/tests/src/test/scala/runtime/actionContainers/NodeJs12ConcurrentTests.scala
+++ b/tests/src/test/scala/runtime/actionContainers/NodeJs12ConcurrentTests.scala
@@ -23,5 +23,5 @@
@RunWith(classOf[JUnitRunner])
class NodeJs12ConcurrentTests extends NodeJsConcurrentTests {
override lazy val nodejsContainerImageName = "action-nodejs-v12"
- override lazy val nodejsTestDockerImageName = "nodejs8docker"
+ override lazy val nodejsTestDockerImageName = "nodejs12docker"
}
diff --git a/tests/src/test/scala/runtime/actionContainers/NodeJs14ActionContainerTests.scala b/tests/src/test/scala/runtime/actionContainers/NodeJs14ActionContainerTests.scala
new file mode 100644
index 0000000..72418b4
--- /dev/null
+++ b/tests/src/test/scala/runtime/actionContainers/NodeJs14ActionContainerTests.scala
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package runtime.actionContainers
+
+import org.junit.runner.RunWith
+import org.scalatest.junit.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+class NodeJs14ActionContainerTests extends NodeJs8ActionContainerTests {
+ override lazy val nodejsContainerImageName = "action-nodejs-v14"
+ override lazy val nodejsTestDockerImageName = "nodejs14docker"
+}
diff --git a/tests/src/test/scala/runtime/actionContainers/NodeJs14ConcurrentTests.scala b/tests/src/test/scala/runtime/actionContainers/NodeJs14ConcurrentTests.scala
new file mode 100644
index 0000000..bc61f39
--- /dev/null
+++ b/tests/src/test/scala/runtime/actionContainers/NodeJs14ConcurrentTests.scala
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package runtime.actionContainers
+
+import org.junit.runner.RunWith
+import org.scalatest.junit.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+class NodeJs14ConcurrentTests extends NodeJsConcurrentTests {
+ override lazy val nodejsContainerImageName = "action-nodejs-v14"
+ override lazy val nodejsTestDockerImageName = "nodejs14docker"
+}
diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh
index 9663aa0..6917e9f 100755
--- a/tools/travis/publish.sh
+++ b/tools/travis/publish.sh
@@ -36,6 +36,8 @@
RUNTIME="nodejs10Action"
elif [ ${RUNTIME_VERSION} == "12" ]; then
RUNTIME="nodejs12Action"
+elif [ ${RUNTIME_VERSION} == "14" ]; then
+ RUNTIME="nodejs14Action"
fi
if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then