Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Node from v14 to v18 #289

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@ trigger:

linting: &linting
pull: if-not-exists
image: node:14
image: node:18
environment:
NOTIFY_KEY: USE_MOCK
commands:
- yarn run test:lint

unit_tests: &unit_tests
pull: if-not-exists
image: node:14
image: node:18
environment:
NOTIFY_KEY: USE_MOCK
commands:
- yarn run test:unit

sonar_scanner: &sonar_scanner
pull: if-not-exists
image: quay.io/ukhomeofficedigital/sonar-scanner-node:549b75f593f28da1c4a0a6f79877ec69d3b21037
image: quay.io/ukhomeofficedigital/sonar-scanner-nodejs:latest
commands:
- sonar-scanner -Dproject.settings=./sonar-project.properties

integration_tests: &integration_tests
pull: if-not-exists
image: node:14
image: node:18
environment:
NOTIFY_KEY: USE_MOCK

Expand Down Expand Up @@ -77,7 +77,7 @@ steps:

- name: setup_deploy
pull: if-not-exists
image: node:14
image: node:18
environment:
NOTIFY_KEY: USE_MOCK
commands:
Expand Down Expand Up @@ -165,7 +165,7 @@ steps:

- name: setup_branch
pull: if-not-exists
image: node:14
image: node:18
environment:
NOTIFY_KEY: USE_MOCK
commands:
Expand Down Expand Up @@ -229,7 +229,7 @@ steps:
# Snyk & Anchore security scans which run after branch deployment to prevent blocking of PR UAT tests
- name: snyk_scan
pull: if-not-exists
image: node:14
image: node:18
environment:
SNYK_TOKEN:
from_secret: snyk_token
Expand Down Expand Up @@ -415,7 +415,7 @@ steps:

- name: cron_snyk_scan
pull: if-not-exists
image: node:14
image: node:18
environment:
SNYK_TOKEN:
from_secret: snyk_token
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:14-alpine@sha256:5c33bc6f021453ae2e393e6e20650a4df0a4737b1882d389f17069dc1933fdc5
FROM node:18-alpine@sha256:2322b1bb3917b313f2e9308395aa5c39d51b91cc92a5d4d5be6d0451fcfb4d24

USER root

# Update packages as a result of Anchore security vulnerability checks
RUN apk update && \
apk add --upgrade gnutls binutils nodejs nodejs-npm apk-tools libjpeg-turbo libcurl libx11 libxml2
apk add --upgrade gnutls binutils nodejs npm apk-tools libjpeg-turbo libcurl libx11 libxml2


# Setup nodejs group & nodejs user
RUN addgroup --system nodejs --gid 998 && \
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- EMAIL_HOST=maildev
- EMAIL_PORT=25
- [email protected]
- NOTIFY_KEY=hof_test-89548f6c-39cd-4acb-851c-1f4ffa2e479b-28426e56-443a-4ba4-98ed-fb576e717ed9
- REDIS_HOST=redis
- REDIS_PORT=6379
- SESSION_SECRET=adsasdasd
Expand All @@ -23,7 +24,7 @@ services:
image: redis

nginx-proxy:
image: quay.io/ukhomeofficedigital/nginx-proxy:v1.2.3
image: quay.io/ukhomeofficedigital/nginx-proxy:latest
environment:
- PROXY_SERVICE_HOST=app
- PROXY_SERVICE_PORT=8080
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "The General Register Office DSP form",
"license": "GPL-2.0",
"engines": {
"node": ">=14.15.0"
"node": ">=18.12.1"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3017,9 +3017,9 @@ hmac-drbg@^1.0.1:
minimalistic-crypto-utils "^1.0.1"

hof@^20.1.21:
version "20.1.21"
resolved "https://registry.yarnpkg.com/hof/-/hof-20.1.21.tgz#682eaf167fb4df022f64de3ede941727543c0d85"
integrity sha512-3jhssUN2eWfK9NOUFon4WiGu6SE49hoO1rSWOKVbezPQgyQHEvxGyjUQefCDXTs/MUN9F311MLvTVQUPvdg/7A==
version "20.2.2"
resolved "https://registry.yarnpkg.com/hof/-/hof-20.2.2.tgz#268feca3173010b432289d87bd8adeec89467f1d"
integrity sha512-EO4/f/Y7pO7IbxuF//vcR2dIKeay6rbZiuM+0PNj3kkxq0X6uxd17oKam7SedRXaStnbhWEjXbzFCl0S2OONvA==
dependencies:
aliasify "^2.1.0"
bluebird "^3.7.2"
Expand Down