Skip to content

Commit

Permalink
Merge pull request #1028 from securityscorecard/ajkl2533@upgraade-nod…
Browse files Browse the repository at this point in the history
…e-22

build: use Node@22 as build version
  • Loading branch information
ajkl2533 authored Jul 17, 2024
2 parents 1c17619 + 1560d71 commit 8d3c1a8
Show file tree
Hide file tree
Showing 11 changed files with 1,380 additions and 1,389 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18','20']
node: ['18','20','22']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Cache yarn files
uses: actions/cache@v4
Expand All @@ -59,9 +59,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-22-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-22-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-16-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-16-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Cache yarn files
uses: actions/cache@v4
Expand All @@ -147,9 +147,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-22-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-22-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand All @@ -174,7 +174,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Cache yarn files
uses: actions/cache@v4
Expand All @@ -183,9 +183,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-22-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-22-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand All @@ -202,7 +202,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18','20']
node: ['18','20','22']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Cache yarn files
uses: actions/cache@v4
Expand All @@ -267,9 +267,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-22-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-22-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: 'https://registry.npmjs.org'
scope: '@securityscorecard'

Expand All @@ -320,9 +320,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-22-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-22-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand All @@ -336,7 +336,7 @@ jobs:
uses: actions/cache@v4
with:
path: build
key: node-18-${{ hashFiles('**/yarn.lock', '**/package.json', '**/rollup.config.js', 'src/**') }}
key: node-22-${{ hashFiles('**/yarn.lock', '**/package.json', '**/rollup.config.js', 'src/**') }}

- name: Build Step
if: steps.library-build-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -374,9 +374,9 @@ jobs:
path: |
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
key: ${{ runner.os }}-node-16-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.os }}-node-16-${{ env.cache-name }}-
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.20.1
v22.4.1
874 changes: 0 additions & 874 deletions visual-regressions/.yarn/releases/yarn-3.6.4.cjs

This file was deleted.

894 changes: 894 additions & 0 deletions visual-regressions/.yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion visual-regressions/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs
packageExtensions:
storycap@*:
dependencies:
'@storybook/manager-api': '*'
'@storybook/preview-api': '*'

yarnPath: .yarn/releases/yarn-4.3.1.cjs
2 changes: 1 addition & 1 deletion visual-regressions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.20.0
FROM node:22.4.1

Check notice on line 1 in visual-regressions/Dockerfile

View check run for this annotation

Wiz Inc. (710b43d57d) / Wiz IaC Scanner

Healthcheck Instruction Missing

Rule ID: 1f32fabe-5020-4164-abab-76ea09252e32 Severity: Low Resource: FROM={{node:22.4.1}} Ensure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working
Raw output
Expected: Dockerfile should contain instruction 'HEALTHCHECK'
Found: Dockerfile doesn't contain instruction 'HEALTHCHECK'

RUN apt-get update -q -y \

Check warning on line 3 in visual-regressions/Dockerfile

View check run for this annotation

Wiz Inc. (710b43d57d) / Wiz IaC Scanner

Apt Get Install Pin Version Not Defined

Rule ID: 5502f84f-993a-4645-9633-9b8cc54beb20 Severity: Medium Resource: FROM={{node:22.4.1}}.RUN={{apt-get update -q -y && apt-get install -q -y --no-install-recommends apt-utils ca-certificates apt-transport-https chromium && apt-get upgrade -q -y && apt-get clean}} When installing a package, its pin version should be defined
Raw output
Expected: Package 'chromium' has version defined
Found: Package 'chromium' does not have version defined

Check warning on line 3 in visual-regressions/Dockerfile

View check run for this annotation

Wiz Inc. (710b43d57d) / Wiz IaC Scanner

Apt Get Install Pin Version Not Defined

Rule ID: 5502f84f-993a-4645-9633-9b8cc54beb20 Severity: Medium Resource: FROM={{node:22.4.1}}.RUN={{apt-get update -q -y && apt-get install -q -y --no-install-recommends apt-utils ca-certificates apt-transport-https chromium && apt-get upgrade -q -y && apt-get clean}} When installing a package, its pin version should be defined
Raw output
Expected: Package 'apt-transport-https' has version defined
Found: Package 'apt-transport-https' does not have version defined

Check warning on line 3 in visual-regressions/Dockerfile

View check run for this annotation

Wiz Inc. (710b43d57d) / Wiz IaC Scanner

Apt Get Install Pin Version Not Defined

Rule ID: 5502f84f-993a-4645-9633-9b8cc54beb20 Severity: Medium Resource: FROM={{node:22.4.1}}.RUN={{apt-get update -q -y && apt-get install -q -y --no-install-recommends apt-utils ca-certificates apt-transport-https chromium && apt-get upgrade -q -y && apt-get clean}} When installing a package, its pin version should be defined
Raw output
Expected: Package 'apt-utils' has version defined
Found: Package 'apt-utils' does not have version defined

Check warning on line 3 in visual-regressions/Dockerfile

View check run for this annotation

Wiz Inc. (710b43d57d) / Wiz IaC Scanner

Apt Get Install Pin Version Not Defined

Rule ID: 5502f84f-993a-4645-9633-9b8cc54beb20 Severity: Medium Resource: FROM={{node:22.4.1}}.RUN={{apt-get update -q -y && apt-get install -q -y --no-install-recommends apt-utils ca-certificates apt-transport-https chromium && apt-get upgrade -q -y && apt-get clean}} When installing a package, its pin version should be defined
Raw output
Expected: Package 'ca-certificates' has version defined
Found: Package 'ca-certificates' does not have version defined
&& apt-get install -q -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion visual-regressions/bin/take-and-check-in-docker-ci.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
docker run --rm -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -v "$PWD/storybook-static:/usr/src/app/storybook" --platform=linux/amd64 radekpodrazky/visual-regressions:node18.20.0-chrome-123.0.6312.86-002 yarn serve-take-and-check
docker run --rm -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -v "$PWD/storybook-static:/usr/src/app/storybook" --platform=linux/amd64 radekpodrazky/visual-regressions:node22.4.1-chrome-126.0.6478.126-001 yarn serve-take-and-check
2 changes: 1 addition & 1 deletion visual-regressions/bin/take-and-check-in-docker.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
docker run --rm --network host -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -it radekpodrazky/visual-regressions:node18.20.0-chrome-123.0.6312.86-002 yarn take-and-check
docker run --rm --network host -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -it radekpodrazky/visual-regressions:node22.4.1-chrome-126.0.6478.126-001 yarn take-and-check
2 changes: 1 addition & 1 deletion visual-regressions/bin/take-and-update-in-docker.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
docker run --rm --network host -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -it radekpodrazky/visual-regressions:node18.20.0-chrome-123.0.6312.86-002 yarn take-and-update
docker run --rm --network host -v "$PWD/.storybook/image-snapshots/:/usr/src/app/snapshots" -it radekpodrazky/visual-regressions:node22.4.1-chrome-126.0.6478.126-001 yarn take-and-update
10 changes: 5 additions & 5 deletions visual-regressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve-take-and-check": "start-server-and-test 'serve storybook' http-get://localhost:3000 'STORYBOOK_URL=http://localhost:3000 ./bin/take.sh && ./bin/check.sh'"
},
"devDependencies": {
"reg-cli": "^0.18.1",
"serve": "^14.2.1",
"start-server-and-test": "^2.0.3",
"storycap": "^4.3.1"
"reg-cli": "0.18.1",
"serve": "^14.2.3",
"start-server-and-test": "^2.0.4",
"storycap": "^5.0.0"
},
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@4.3.1"
}
Loading

0 comments on commit 8d3c1a8

Please sign in to comment.