Skip to content

Commit

Permalink
BT-628 Upgrade node to 14 (#747)
Browse files Browse the repository at this point in the history
* Ping CI

* Isolated upgrade to 14

* Remove comment

* Add comment
  • Loading branch information
jgainerdewar committed Apr 28, 2022
1 parent 8eb82ed commit 7d1fb6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,12 @@ jobs:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# The CI code that ran on the previous "latest" Circle machine image used the nvm included on that image
# to install what that version of nvm considered to be the LTS version of Node. However the current Node LTS
# is now 16 and some of JMUI's dependencies break with Node 14+, so install Node 12 explicitly.
#
# npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
nvm install 12
nvm install 14
cd ui
npm install
# node-sass was apparently built for Node 6 and requires this extra step for Node 12.
# node-sass was apparently built for Node 6 and requires this extra step for Node 14.
npm rebuild node-sass
npm install -g @angular/cli@1.7.4
Expand All @@ -79,7 +74,7 @@ jobs:
# nvm setup commands and Node install reprised
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 12
nvm install 14
ng lint --type-check
- run:
name: Run UI unit tests
Expand All @@ -88,7 +83,7 @@ jobs:
# nvm setup commands and Node install reprised
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 12
nvm install 14
ng test --single-run -sm=false --browsers=ChromeHeadless
- run:
name: Ensure the UI builds for prod
Expand All @@ -100,7 +95,7 @@ jobs:
# nvm setup commands and Node install reprised
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 12
nvm install 14
ng build --target=production --environment=dev
backends:
Expand Down
2 changes: 1 addition & 1 deletion ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ADD ./ /job-manager

RUN /bin/bash -c scripts/rebuild_swagger.sh

FROM us.gcr.io/broad-dsp-gcr-public/base/nodejs:12-debian
FROM us.gcr.io/broad-dsp-gcr-public/base/nodejs:14-debian

WORKDIR /ui

Expand Down
2 changes: 2 additions & 0 deletions ui/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Note: This is the dockerfile for development purposes

# We are aware that some dev dependencies are broken in node 14, for example chokidar
# npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+.
FROM node:14

# Install python 2, needed for npm packages
Expand Down

0 comments on commit 7d1fb6a

Please sign in to comment.