Skip to content

Commit

Permalink
EPMRPP-80259 || Support for Node.js version 20 (#3744)
Browse files Browse the repository at this point in the history
* EPMRPP-80259 || Upgrade Node.js version to 20

* EPMRPP-80259 || add --legacy-peer-deps

* EPMRPP-80259 || lint fix

* EPMRPP-80259 || Dockerfile fix

* EPMRPP-80259 || code review fixes - 1

* EPMRPP-80259 || Dockerfile python3 add

* EPMRPP-80259 || Fix node-sass installation error

---------

Co-authored-by: Ilya Hancharyk <[email protected]>
  • Loading branch information
Vadim73i and AmsterGet authored Feb 19, 2024
1 parent 00b2fc7 commit af9f735
Show file tree
Hide file tree
Showing 17 changed files with 22,569 additions and 18,953 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14]
node: [20]

steps:
- uses: actions/checkout@v3
Expand All @@ -38,7 +38,7 @@ jobs:
NODE_OPTIONS: '--max_old_space_size=2048'

run: |
npm --prefix ${{ env.UI_BUILD_REACT }} ci
npm --prefix ${{ env.UI_BUILD_REACT }} ci --legacy-peer-deps
npm --prefix ${{ env.UI_BUILD_REACT }} run lint
npm --prefix ${{ env.UI_BUILD_REACT }} run test:coverage
npm --prefix ${{ env.UI_BUILD_REACT }} run build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '14.19.1'
node-version: '20.11.0'

- name: JS Build
env:
NODE_OPTIONS: '--max_old_space_size=2048'

run: |
npm --prefix ${{ env.UI_BUILD_REACT }} ci
npm --prefix ${{ env.UI_BUILD_REACT }} ci --legacy-peer-deps
npm --prefix ${{ env.UI_BUILD_REACT }} run lint
npm --prefix ${{ env.UI_BUILD_REACT }} run test:coverage
npm --prefix ${{ env.UI_BUILD_REACT }} run build
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Only for technical/build aims, built image will be with nginxinc/nginx-unprivileged:alpine according to the last step

FROM --platform=$BUILDPLATFORM alpine:3.16.2 AS generate-build-info
FROM --platform=$BUILDPLATFORM alpine:3.18 AS generate-build-info
RUN mkdir -p /usr/src/app/build
WORKDIR /usr/src
ARG APP_VERSION=develop
ARG BUILD_BRANCH
ARG BUILD_DATE
RUN echo {\"build\": { \"version\": \"${APP_VERSION}\", \"branch\": \"${BUILD_BRANCH}\", \"build_date\": \"${BUILD_DATE}\", \"name\": \"Service UI\", \"repo\": \"reportportal/service-ui\"}} > ./app/build/buildInfo.json

FROM --platform=$BUILDPLATFORM node:14-alpine AS build-frontend
FROM --platform=$BUILDPLATFORM node:20-alpine AS build-frontend
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY ./app/ /usr/src/app/
RUN export NODE_OPTIONS="--max-old-space-size=4096"
RUN npm ci && npm run build
RUN npm ci --legacy-peer-deps && npm run build

FROM --platform=$BUILDPLATFORM nginxinc/nginx-unprivileged:alpine

Expand Down
4 changes: 2 additions & 2 deletions app/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

## Installation

For local development, you need a [node.js](https://nodejs.org)(minimum required version 12, recommended - 14).
For local development, you need a [node.js](https://nodejs.org)(version 20 is recommended).

To launch the development environment, follow these steps:

1. open console from the project root
2. run the command `cd app`
3. run the command `npm install`
3. run the command `npm install --legacy-peer-deps`
4. to proxy requests to the server, create `.env` file in `app` folder

```
Expand Down
Loading

0 comments on commit af9f735

Please sign in to comment.