From ea46a5ee7ea39d815745b27d7076b352439d692f Mon Sep 17 00:00:00 2001 From: Erwin Gronek Date: Thu, 12 Dec 2024 09:37:17 +0100 Subject: [PATCH] [ZARS-669][ADD]node 22 (#32) * [ZARS-669][ADD]update node * [ZARS-669][ADD]update node version in github actions * [ZARS][ADD]update nvmrc --- .github/workflows/pipeline.yml | 24 ++++++++++-------------- .nvmrc | 2 +- Dockerfile | 6 +++--- package.json | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 8a6fc0b..fe86b0a 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -4,42 +4,40 @@ on: push: pull_request: - env: containerRegistry: container-registry.cr.de-fra.ionos.com imageName: fdpg-api isMain: ${{ github.ref == 'refs/heads/main' }} isDev: ${{ github.ref == 'refs/heads/dev' }} - nodeVersion: "20.14.0" - + nodeVersion: '22.12.0' jobs: qualitiy_gate: - name: "Qualitiy Gate" + name: 'Qualitiy Gate' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: "Setup Node" + - name: 'Setup Node' uses: actions/setup-node@v3 with: node-version: ${{env.nodeVersion}} cache: yarn - - name: "Installing Modules" + - name: 'Installing Modules' run: yarn install - - name: "Jest Unit Testing" + - name: 'Jest Unit Testing' run: yarn test - - name: "Publish Test Results" + - name: 'Publish Test Results' uses: mikepenz/action-junit-report@v3 - if: success() || failure() # always run even if the previous step fails + if: success() || failure() # always run even if the previous step fails with: report_paths: '**/reports/junit.xml' fail_on_failure: true - - name: "Publish Code Coverage" + - name: 'Publish Code Coverage' uses: 5monkeys/cobertura-action@master if: ${{github.event_name == 'pull_request' }} with: @@ -48,9 +46,8 @@ jobs: fail_below_threshold: false only_changed_files: true - build_container_image: - name: "Build Container Image" + name: 'Build Container Image' runs-on: ubuntu-latest needs: qualitiy_gate steps: @@ -99,8 +96,7 @@ jobs: with: push: ${{env.isMain == 'true' || env.isDev == 'true' }} tags: ${{env.containerRegistry}}/fdpg/${{env.imageName}}:${{env.imageTag}} - labels: - BUILD_DATE=${{env.pipeDate}} + labels: BUILD_DATE=${{env.pipeDate}} BUILD_TIME=${{env.pipeTime}} BUILD_NO_OF_DATE=${{env.buildNumberOfDate}} SOURCE_BRANCH=${{github.ref}} diff --git a/.nvmrc b/.nvmrc index 2edeafb..8fdd954 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 \ No newline at end of file +22 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c4dcaea..d824d12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20 AS build +FROM node:22 AS build WORKDIR /usr/src/app COPY package*.json ./ COPY yarn.lock ./ @@ -6,13 +6,13 @@ RUN yarn install COPY . . RUN yarn build -FROM node:20-alpine as productionModules +FROM node:22-alpine as productionModules WORKDIR /usr/src/app COPY package*.json ./ COPY yarn.lock ./ RUN yarn install --production=true -FROM node:20-alpine as release +FROM node:22-alpine as release ARG NODE_ENV=production ENV NODE_ENV=$NODE_ENV ARG SOFTWARE_VERSION=FILLED_BY_PIPELINE diff --git a/package.json b/package.json index 2fed593..12df5f9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": true, "license": "UNLICENSED", "engines": { - "node": ">=20" + "node": ">=22" }, "scripts": { "prebuild": "rimraf dist",