Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit efbab82

Browse files
authored
Remove nodejs:10, nodejs:12 and nodejs:14 from supported runtimes. (#264)
1 parent bea6b51 commit efbab82

File tree

8 files changed

+39
-110
lines changed

8 files changed

+39
-110
lines changed

README.md

+10-91
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
[![Build Status](https://travis-ci.org/ibm-functions/runtime-nodejs.svg?branch=master)](https://travis-ci.com/ibm-functions/runtime-nodejs)
44

5-
- The runtime provides [nodejs v10](nodejs10/) with a set of [npm packages](nodejs10/package.json) see [nodejs10/CHANGELOG.md](nodejs10/CHANGELOG.md)
6-
- The runtime provides [nodejs v12](nodejs12/) with a set of [npm packages](nodejs12/package.json) see [nodejs12/CHANGELOG.md](nodejs12/CHANGELOG.md)
7-
- The runtime provides [nodejs v14](nodejs14/) with a set of [npm packages](nodejs14/package.json) see [nodejs14/CHANGELOG.md](nodejs14/CHANGELOG.md)
85
- The runtime provides [nodejs v16](nodejs16/) with a set of [npm packages](nodejs16/package.json) see [nodejs16/CHANGELOG.md](nodejs16/CHANGELOG.md)
96

107

@@ -18,40 +15,34 @@ The runtime provides the following npm packages for [IBM Cloud](https://bluemix.
1815
### How to use as a docker Action
1916
To use as a docker action
2017
```
21-
ibmcloud wsk action update myAction myAction.js --docker ibmfunctions/action-nodejs-ibm-v10
18+
ibmcloud wsk action update myAction myAction.js --docker ibmfunctions/action-nodejs-ibm-v16
2219
```
2320
This works on any deployment of Apache OpenWhisk or IBM Cloud Functions
2421

2522
### Future: IBM Cloud Functions (based on Apache OpenWhisk)
2623
To use as a nodejs kind action
2724
```
28-
ibmcloud wsk action update myAction myAction --kind nodejs:10
25+
ibmcloud wsk action update myAction myAction --kind nodejs:16
2926
```
3027
Tip: Not available yet in the IBM Cloud
3128

3229
### Working with the local git repo
3330
Prerequisite: *Export* OPENWHISK_HOME to point to your incubator/openwhisk cloned directory.
3431

35-
To build the `nodejs:10` runtime:
32+
To build the `nodejs:16` runtime:
3633
```
37-
./gradlew nodejs10:distDocker
34+
./gradlew nodejs16:distDocker
3835
```
39-
This will produce the image `whisk/action-nodejs-ibm-v10`
40-
41-
To build the `nodejs:12` runtime:
42-
```
43-
./gradlew nodejs12:distDocker
44-
```
45-
This will produce the image `whisk/action-nodejs-ibm-v12`
36+
This will produce the image `whisk/action-nodejs-ibm-v16`
4637

4738

4839
Build and Push image
4940
```
5041
docker login
51-
./gradlew nodejs10:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
42+
./gradlew nodejs16:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
5243
```
5344

54-
Deploy OpenWhisk using ansible environment that adds the new king `nodejs:10`
45+
Deploy OpenWhisk using ansible environment that adds the new king `nodejs:16`
5546
Assuming you have OpenWhisk already deploy localy and `OPENWHISK_HOME` pointing to root directory of OpenWhisk core repository.
5647

5748
Set `ROOTDIR` to the root directory of this repository.
@@ -69,12 +60,12 @@ $ANSIBLE_CMD openwhisk.yml
6960

7061
To use as docker action push to your own dockerhub account
7162
```
72-
docker tag whisk/action-nodejs-ibm-v10 $user_prefix/action-nodejs-ibm-v10
73-
docker push $user_prefix/action-nodejs-ibm-v10
63+
docker tag whisk/action-nodejs-ibm-v16 $user_prefix/action-nodejs-ibm-v16
64+
docker push $user_prefix/action-nodejs-ibm-v16
7465
```
7566
Then create the action using your the image from dockerhub
7667
```
77-
wsk action update myAction myAction.js --docker $user_prefix/action-nodejs-ibm-v10
68+
wsk action update myAction myAction.js --docker $user_prefix/action-nodejs-ibm-v16
7869
```
7970
The `$user_prefix` is usually your dockerhub user id.
8071

@@ -167,78 +158,6 @@ nvm ls-remote | grep v16.
167158
- Update [nodejs16/package.json](nodejs16/package.json)
168159
- Update [nodejs16/CHANGELOG.md](nodejs16/CHANGELOG.md)
169160

170-
### Updating Node.js 14 runtime
171-
- Get the version of the latest tag ibm image
172-
```
173-
VERSION=$(git tag | grep 14@ | tail -2 | head -1 | awk -F"@" '{print $2 }')
174-
```
175-
- Check the version of nodejs on the latest ibm image released
176-
```
177-
docker run --rm -it ibmfunctions/action-nodejs-v14:$VERSION sh -c "node -v"
178-
```
179-
- Check if there is a new version of the [Node.js LTS 14](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md).
180-
```
181-
nvm ls-remote | grep v14.
182-
```
183-
- If there is a new version update the [OpenWhisk Node.js 14 Dockerfile](https://github.com/apache/openwhisk-runtime-nodejs/blob/master/core/nodejs14Action/Dockerfile#L18) and submit PR.
184-
- After PR is merged wait for Travis CI to build and push a new tag image for [openwhisk/action-nodejs-v14](https://hub.docker.com/r/openwhisk/action-nodejs-v14/tags)
185-
- Update the ibm image [nodejs14/Dockerfile](nodejs14/Dockerfile) FROM usign the new upstream tag
186-
- Check if there are new npm packages available
187-
- Use the latest released image to check the outdated npm packages
188-
```
189-
docker run --rm -it ibmfunctions/action-nodejs-v14:$VERSION sh -c "cd / && npm outdated"
190-
```
191-
- Update [nodejs14/package.json](nodejs14/package.json)
192-
- Update [nodejs14/CHANGELOG.md](nodejs14/CHANGELOG.md)
193-
194-
### Updating Node.js 12 runtime
195-
- Get the version of the latest tag ibm image
196-
```
197-
VERSION=$(git tag | grep 12@ | tail -2 | head -1 | awk -F"@" '{print $2 }')
198-
```
199-
- Check the version of nodejs on the latest ibm image released
200-
```
201-
docker run --rm -it ibmfunctions/action-nodejs-v12:$VERSION sh -c "node -v"
202-
```
203-
- Check if there is a new version of the [Node.js LTS 12](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md).
204-
```
205-
nvm ls-remote | grep v12.
206-
```
207-
- If there is a new version update the [OpenWhisk Node.js 12 Dockerfile](https://github.com/apache/openwhisk-runtime-nodejs/blob/master/core/nodejs12Action/Dockerfile#L18) and submit PR.
208-
- After PR is merged wait for Travis CI to build and push a new tag image for [openwhisk/action-nodejs-v12](https://hub.docker.com/r/openwhisk/action-nodejs-v12/tags)
209-
- Update the ibm image [nodejs12/Dockerfile](nodejs12/Dockerfile) FROM usign the new upstream tag
210-
- Check if there are new npm packages available
211-
- Use the latest released image to check the outdated npm packages
212-
```
213-
docker run --rm -it ibmfunctions/action-nodejs-v12:$VERSION sh -c "cd / && npm outdated"
214-
```
215-
- Update [nodejs12/package.json](nodejs12/package.json)
216-
- Update [nodejs12/CHANGELOG.md](nodejs12/CHANGELOG.md)
217-
218-
### Updating Node.js 10 runtime
219-
- Get the version of the latest tag ibm image
220-
```
221-
VERSION=$(git tag | grep 10@ | tail -2 | head -1 | awk -F"@" '{print $2 }')
222-
```
223-
- Check the version of nodejs on the latest ibm image released
224-
```
225-
docker run --rm -it ibmfunctions/action-nodejs-v10:$VERSION sh -c "node -v"
226-
```
227-
- Check if there is a new version of the [Node.js LTS 10](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md).
228-
```
229-
nvm ls-remote | grep v10.
230-
```
231-
- If there is a new version update the [OpenWhisk Node.js 10 Dockerfile](https://github.com/apache/openwhisk-runtime-nodejs/blob/master/core/nodejs10Action/Dockerfile#L18) and submit PR.
232-
- After PR is merged wait for Travis CI to build and push a new tag image for [openwhisk/action-nodejs-v10](https://hub.docker.com/r/openwhisk/action-nodejs-v10/tags)
233-
- Update the ibm image [nodejs10/Dockerfile](nodejs10/Dockerfile) FROM usign the new upstream tag
234-
- Check if there are new npm packages available
235-
- Use the latest released image to check the outdated npm packages
236-
```
237-
docker run --rm -it ibmfunctions/action-nodejs-v10:$VERSION sh -c "cd / && npm outdated"
238-
```
239-
- Update [nodejs10/package.json](nodejs10/package.json)
240-
- Update [nodejs10/CHANGELOG.md](nodejs10/CHANGELOG.md)
241-
242161
### Pushing new versions for runtimes
243162
- After the PR is merged and the master pass Travis CI, checkout master.
244163
- Create tag for each runtime and push upstream

ansible/environments/local/group_vars/all

-15
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ skip_pull_runtimes: true
3131
runtimes_manifest:
3232
runtimes:
3333
nodejs:
34-
- kind: "nodejs:10"
35-
default: false
36-
image:
37-
name: "action-nodejs-v10"
38-
deprecated: false
39-
- kind: "nodejs:12"
40-
default: false
41-
image:
42-
name: "action-nodejs-v12"
43-
deprecated: false
44-
- kind: "nodejs:14"
45-
default: false
46-
image:
47-
name: "action-nodejs-v14"
48-
deprecated: false
4934
- kind: "nodejs:16"
5035
default: true
5136
image:

nodejs10/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# IBM Functions NodeJS 10 Runtime Container
22

3+
# Attention
4+
This runtime is deprecated and will not be supported anymore. The code is still here for reference only and might be deleted at any time!
5+
36
## Migrating from `nodejs:8` to `nodejs:10`
47
- The `cloudant` npm package is not available in `nodejs:10`, the package is deprecated, you need to use the official npm package [@cloudant/cloudant](https://www.npmjs.com/package/@cloudant/cloudant) v3.x when importing the nodejs module (i.e `require('@cloudant/cloudant')`) also [v3.x only returns Promises](https://github.com/cloudant/nodejs-cloudant/blob/master/api-migration.md#2x--3x).
58
- The `watson-developer-cloud` npm package available in `nodejs:10` is version 4.x. This version includes support for Promises. [A list of the changes made is documented](https://github.com/watson-developer-cloud/node-sdk/blob/master/UPGRADE-4.0.md).

nodejs12/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# IBM Functions NodeJS 12 Runtime Container
22

3+
# Attention
4+
This runtime is deprecated and will not be supported anymore. The code is still here for reference only and might be deleted at any time!
5+
36
## Migrating from `nodejs:10` to `nodejs:12`
47
- The ibm-watson sdk version moved to 6.x. It includes a number of breaking changes. See https://github.com/watson-developer-cloud/node-sdk/blob/HEAD/MIGRATION-V6.md for details.
58
- The `ibmiotf` package is renamed to `@wiotp/sdk`. See https://www.npmjs.com/package/@wiotp/sdk for all changes.

nodejs14/CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# IBM Functions NodeJS 12 Runtime Container
1+
# IBM Functions NodeJS 14 Runtime Container
2+
3+
# Attention
4+
This runtime is deprecated and will not be supported anymore. The code is still here for reference only and might be deleted at any time!
25

36
## Migrating from `nodejs:12` to `nodejs:14`
47
- The `@cloudant/cloudant` package is deprecated and therefore not available in this runtime. Please see the [Migration Guide](https://github.com/cloudant/nodejs-cloudant/blob/HEAD/MIGRATION.md) for advice about migrating to the replacement library [@ibm-cloud/cloudant](https://github.com/IBM/cloudant-node-sdk).

nodejs8/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# IBM Functions NodeJS 8 Runtime Container
22

3+
# Attention
4+
This runtime is deprecated and will not be supported anymore. The code is still here for reference only and might be deleted at any time!
5+
36
# 1.42.0
47
Changes:
58
- update lodash from `4.17.13` to `4.17.19` (security fixes)

settings.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
include 'tests'
22

3-
include 'nodejs10'
4-
include 'nodejs12'
5-
include 'nodejs14'
63
include 'nodejs16'
74

85
rootProject.name = 'runtime-nodejs-ibm'

tests/build.gradle

+16
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ tasks.withType(Test) {
1515
exceptionFormat = 'full'
1616
}
1717
outputs.upToDateWhen { false } // force tests to run every time
18+
19+
// Exclude the nodejs:10 specific tests as this runtime is not supported anymore.
20+
exclude '**/*NodeJs10*'
21+
22+
// Exclude the nodejs:12 specific tests as this runtime is not supported anymore.
23+
exclude '**/*NodeJs12*'
24+
25+
// Exclude the nodejs:14 specific tests as this runtime is not supported anymore.
26+
exclude '**/*IBMNodeJsActionContainerTests*'
27+
exclude '**/*IBMNodeJsActionDB2Tests*'
28+
exclude '**/*IBMNodeJsActionCloudant*'
29+
exclude '**/*IBMNodeJsActionWatson*'
30+
exclude '**/*IBMNodeJsCOS*'
31+
exclude '**/*IBMNodeJsDb2Cloud*'
32+
exclude '**/*NodeJsSDK*'
33+
1834
}
1935

2036
task testWithoutCredentials(type: Test) {

0 commit comments

Comments
 (0)