Skip to content

Commit

Permalink
Update node version (#375)
Browse files Browse the repository at this point in the history
* Update nodejs environment

* Update nodejs environmnt docs

* Updated fission version to 1.20.3.
Changes container registry to ghcr from dockerhub.

* Updated kind version to v0.23.0 and ks8 version to v1.25.16 for nodejs workflow.
Updated base image for nodejs profile in skaffold.yaml file.

* Updated node version and helm version

* Use proper namespace for fission v1.20.3

---------

Signed-off-by: Md Soharab Ansari <[email protected]>
  • Loading branch information
soharab-ic authored Aug 21, 2024
1 parent a6e2644 commit 01fa43d
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 31 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,24 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
- name: Unit test
run: |
pushd nodejs/
npm install
./test/local_test.sh
popd
- name: Helm
uses: Azure/setup-helm@v1
uses: Azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.3.4
version: v3.13.0
- name: Kind Clutser
uses: engineerd/[email protected]
with:
image: kindest/node:v1.21.1
version: v0.11.1
image: kindest/node:v1.25.16
version: v0.23.0
config: kind.yaml
- name: Base Setup
run: |
Expand Down
6 changes: 3 additions & 3 deletions hack/release_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import requests
import subprocess

FISSION_REPO = "fission"
FISSION_REPO = "ghcr.io/fission"

DOCKERHUB_URL = "https://hub.docker.com/v2/repositories/{repo}/{env}/tags/{tag}"
GHCR_URL = "https://ghcr.io/v2/{repo}/{env}/tags/{tag}"
def check_if_image_exists(image,tag):
docker_uri = DOCKERHUB_URL.format(
docker_uri = GHCR_URL.format(
repo=FISSION_REPO,
env=image,
tag=tag,
Expand Down
12 changes: 8 additions & 4 deletions nodejs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
-include ../rules.mk

.PHONY: all
all: node-env-debian-img node-env-16-img
all: node-builder node-env-img node-env-debian-img node-env-22-img

node-env-debian-img-buildargs := --build-arg NODE_BASE_IMG=12.22.7
node-env-img-buildargs := --build-arg NODE_BASE_IMG=20.16.0-alpine3.20

node-env-16-img-buildargs := --build-arg NODE_BASE_IMG=16.12.0-alpine3.14
node-env-debian-img-buildargs := --build-arg NODE_BASE_IMG=20.16.0

node-env-22-img-buildargs := --build-arg NODE_BASE_IMG=22.6.0-alpine3.20

node-env-img: Dockerfile

node-env-debian-img: Dockerfile

node-env-16-img: Dockerfile
node-env-22-img: Dockerfile
4 changes: 2 additions & 2 deletions nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ Build and push the image to the the registry:
Building runtime image,

```console
docker build -t USER/node-env --build-arg NODE_BASE_IMG=16.12.0-alpine3.14 -f Dockerfile .
docker build -t USER/node-env --build-arg NODE_BASE_IMG=22.6.0-alpine3.20 -f Dockerfile .
docker push USER/node-env
```

Building builder image,

```console
cd builder && docker build -t USER/node-builder --build-arg NODE_BASE_IMG=16.12.0-alpine3.14 -f Dockerfile .
cd builder && docker build -t USER/node-builder --build-arg NODE_BASE_IMG=22.6.0-alpine3.20 -f Dockerfile .
docker push USER/go-builder
```

Expand Down
12 changes: 8 additions & 4 deletions nodejs/builder/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
-include ../../rules.mk

.PHONY: all
all: node-builder-debian-img node-builder-16-img
all: node-builder-debian-img node-builder-img node-builder-22-img

node-builder-debian-img-buildargs := --build-arg NODE_BASE_IMG=12.22.7
node-builder-debian-img-buildargs := --build-arg NODE_BASE_IMG=22.6.0

node-builder-16-img-buildargs := --build-arg NODE_BASE_IMG=16.12.0-alpine3.14
node-builder-img-buildargs := --build-arg NODE_BASE_IMG=20.16.0-alpine3.20

node-builder-22-img-buildargs := --build-arg NODE_BASE_IMG=22.6.0-alpine3.20

node-builder-debian-img: Dockerfile

node-builder-16-img: Dockerfile
node-builder-img: Dockerfile

node-builder-22-img: Dockerfile
36 changes: 30 additions & 6 deletions nodejs/envconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
],
"name": "Nodejs Environment",
"readme": "https://github.com/fission/environments/tree/master/nodejs",
"runtimeVersion": "12.22.7-debian",
"runtimeVersion": "20.16.0-debian",
"shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added",
"status": "Stable",
"version": "1.32.2"
"version": "1.32.3"
},
{
"builder": "node-builder-16",
"builder": "node-builder-22",
"examples": "https://github.com/fission/environments/tree/master/nodejs/examples",
"icon": "./logo/nodejs-new-pantone-black.svg",
"image": "node-env-16",
"image": "node-env-22",
"keywords": [],
"kind": "environment",
"maintainers": [
Expand All @@ -41,9 +41,33 @@
],
"name": "Nodejs Environment",
"readme": "https://github.com/fission/environments/tree/master/nodejs",
"runtimeVersion": "16.12.0",
"runtimeVersion": "22.6.0",
"shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added",
"status": "Stable",
"version": "1.32.2"
"version": "1.32.3"
},
{
"builder": "node-builder",
"examples": "https://github.com/fission/environments/tree/master/nodejs/examples",
"icon": "./logo/nodejs-new-pantone-black.svg",
"image": "node-env",
"keywords": [],
"kind": "environment",
"maintainers": [
{
"link": "https://github.com/sanketsudake",
"name": "sanketsudake"
},
{
"link": "https://github.com/vishal-biyani",
"name": "vishal-biyani"
}
],
"name": "Nodejs Environment",
"readme": "https://github.com/fission/environments/tree/master/nodejs",
"runtimeVersion": "20.16.0",
"shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added",
"status": "Stable",
"version": "1.32.3"
}
]
2 changes: 1 addition & 1 deletion rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PLATFORMS ?= linux/amd64,linux/arm64,linux/arm
REPO ?= fission
TAG ?= dev
DOCKER_FLAGS ?= --push --progress plain
FISSION_VERSION ?= v1.15.0
FISSION_VERSION ?= v1.20.3
SKAFFOLD_PROFILE ?= kind

%-img:
Expand Down
6 changes: 3 additions & 3 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ deploy:
helm:
releases:
- name: fission
remoteChart: https://fission.github.io/fission-charts/fission-all-v1.15.0.tgz
remoteChart: https://github.com/fission/fission-charts/releases/download/fission-all-v1.20.3/fission-all-v1.20.3.tgz
namespace: fission
setValues:
analytics: "false"
Expand Down Expand Up @@ -82,13 +82,13 @@ profiles:
docker:
dockerfile: Dockerfile
buildArgs:
NODE_BASE_IMG: "12.22.7-alpine3.14"
NODE_BASE_IMG: "20.16.0-alpine3.20"
- image: node-builder
context: nodejs/builder/
docker:
dockerfile: Dockerfile
buildArgs:
NODE_BASE_IMG: "12.22.7-alpine3.14"
NODE_BASE_IMG: "20.16.0-alpine3.20"
- name: perl
build:
artifacts:
Expand Down
4 changes: 2 additions & 2 deletions test_utils/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ wait_for_builder() {
# wait for tiller ready
set +e
while true; do
kubectl --namespace fission-builder get pod -l envName=$env -o jsonpath="$JSONPATH" | grep "Ready=True"
kubectl get pod -l envName=$env -o jsonpath="$JSONPATH" | grep "Ready=True"
if [[ $? -eq 0 ]]; then
break
fi
Expand Down Expand Up @@ -175,7 +175,7 @@ export -f waitBuildExpectedStatus
## Common env parameters
export FISSION_NAMESPACE=${FISSION_NAMESPACE:-fission}
export FUNCTION_NAMESPACE=${FUNCTION_NAMESPACE:-fission-function}
export FUNCTION_NAMESPACE=${FUNCTION_NAMESPACE:-default}
router=$(kubectl -n $FISSION_NAMESPACE get svc router -o jsonpath='{...ip}')
Expand Down

0 comments on commit 01fa43d

Please sign in to comment.