Skip to content

Commit

Permalink
ACM-2430 Update to nodejs 18 (stolostron#2415)
Browse files Browse the repository at this point in the history
* Update to nodejs 18

Signed-off-by: Kevin Cormier <[email protected]>

* Update package-lock.json files to new version

Signed-off-by: Kevin Cormier <[email protected]>

* Update @kubernetes/client-node

Signed-off-by: Kevin Cormier <[email protected]>

* Specify legacy-peer-deps for Dockerfiles

Signed-off-by: Kevin Cormier <[email protected]>

* Update common-nodejs-parent image to nodejs-18

Signed-off-by: Kevin Cormier <[email protected]>

Signed-off-by: Kevin Cormier <[email protected]>
  • Loading branch information
KevinFCormier authored Dec 21, 2022
1 parent 7d5dcfc commit c364941
Show file tree
Hide file tree
Showing 9 changed files with 74,688 additions and 10,308 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/fermium
lts/hydrogen
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs lts-fermium
nodejs lts-hydrogen
10 changes: 5 additions & 5 deletions Dockerfile.mce.prow
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as dynamic-plugin
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as dynamic-plugin
WORKDIR /app/frontend
COPY ./frontend .
RUN npm ci --no-optional || npm ci --no-optional
RUN npm ci --no-optional --legacy-peer-deps
RUN npm run build:plugin:mce

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as backend
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as backend
WORKDIR /app/backend
COPY ./backend .
RUN npm ci --no-optional
RUN npm run build

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as production
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as production
WORKDIR /app/backend
COPY ./backend/package-lock.json ./backend/package.json ./
RUN npm ci --no-optional --only=production

FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-14
FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-18
WORKDIR /app
ENV NODE_ENV production
COPY --from=production /app/backend/node_modules ./node_modules
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile.prow
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as frontend-packages
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as frontend-packages
WORKDIR /app/frontend
# Copy only package.json and package-lock.json so that the docker cache hash only changes if those change
# This will cause the npm ci to only rerun if the package.json or package-lock.json changes
COPY ./frontend/package.json ./frontend/package-lock.json ./
RUN npm ci --no-optional || npm ci --no-optional
RUN npm ci --no-optional --legacy-peer-deps
COPY ./frontend .

FROM frontend-packages as dynamic-plugin
RUN npm run build:plugin:acm

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as backend
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as backend
WORKDIR /app/backend
# Copy only package.json and package-lock.json so that the docker layer cache only changes if those change
# This will cause the npm ci to only rerun if the package.json or package-lock.json changes
Expand All @@ -20,12 +20,12 @@ RUN npm ci --no-optional
COPY ./backend .
RUN npm run build

FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as production
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as production
WORKDIR /app/backend
COPY ./backend/package-lock.json ./backend/package.json ./
RUN npm ci --no-optional --only=production

FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-14
FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-18
WORKDIR /app
ENV NODE_ENV production
COPY --from=production /app/backend/node_modules ./node_modules
Expand Down
Loading

0 comments on commit c364941

Please sign in to comment.