Skip to content

Commit e9ea3d4

Browse files
committed
feat: FLUX-708 - ci-jenkins scripts naar pnpm
npm ci naar corepack + pnpm install --frozen-lockfile, npm run naar pnpm run, npx semantic-release naar pnpm exec, consumer install met --no-frozen-lockfile, en de release pack/publish argumenten zonder -- (pnpm geeft -- letterlijk door).
1 parent 01c1aaf commit e9ea3d4

5 files changed

Lines changed: 45 additions & 40 deletions

File tree

resources/ci-jenkins/bash/build-apps-and-libs.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,41 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
88
cd "${SCRIPT_DIR}/../../.."
99
source "${SCRIPT_DIR}/lib/quiet-step.sh"
1010

11-
quiet_step "npm ci" npm ci --maxsockets 5
11+
corepack enable
12+
quiet_step "pnpm install" pnpm install --frozen-lockfile --network-concurrency 5
1213

1314
echo 'BUILDING - BEGIN'
1415

15-
quiet_step "generate web-types" npm run libs:web-types:generate
16+
quiet_step "generate web-types" pnpm run libs:web-types:generate
1617

1718
echo "validate the generated web-types"
18-
npm run libs:web-types:validate
19+
pnpm run libs:web-types:validate
1920

20-
# de 'npm run' hieronder streamt de output naar de console (zie lib/quiet-step.sh): ze duren lang, bij een crash of OOM wil je zien hoe ver hij geraakt was
21+
# de 'pnpm run' hieronder streamt de output naar de console (zie lib/quiet-step.sh): ze duren lang, bij een crash of OOM wil je zien hoe ver hij geraakt was
2122
echo "build libraries"
22-
npm run libs:build
23+
pnpm run libs:build
2324

24-
quiet_step "add library dependencies" npm run libs:add-dependencies
25+
quiet_step "add library dependencies" pnpm run libs:add-dependencies
2526

2627
echo "build storybook"
27-
npm run apps:storybook:build
28+
pnpm run apps:storybook:build
2829

2930
echo "build integrator"
30-
npm run apps:integrator:build
31+
pnpm run apps:integrator:build
3132

3233
echo "build playground-lit"
33-
npm run apps:playground-lit:build
34+
pnpm run apps:playground-lit:build
3435

3536
echo "build playground-native"
36-
npm run apps:playground-native:build
37+
pnpm run apps:playground-native:build
3738

3839
echo "build playground-react"
39-
npm run apps:playground-react:build
40+
pnpm run apps:playground-react:build
4041

4142
echo "build fat-lib"
42-
npm run fat-lib:build
43+
pnpm run fat-lib:build
4344

4445
echo "build fat-lib-min"
45-
npm run fat-lib:build-min
46+
pnpm run fat-lib:build-min
4647

4748
echo 'BUILDING - END'

resources/ci-jenkins/bash/e2e-tests-storybook.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
88
cd "${SCRIPT_DIR}/../../.."
99
source "${SCRIPT_DIR}/lib/quiet-step.sh"
1010

11-
quiet_step "npm ci" npm ci --maxsockets 5
11+
corepack enable
12+
quiet_step "pnpm install" pnpm install --frozen-lockfile --network-concurrency 5
1213

1314
echo "create build folder with dummy text file - when everything goes well there is no build folder which fails the build"
1415
# -p: deze stage draait in een eigen workspace, maar -p houdt het script ook bruikbaar bij een lokale herhaalde run waar build/ al bestaat
1516
mkdir -p build
1617
touch build/dummy.txt
1718

1819
echo "serve storybook and run the e2e tests"
19-
npm run apps:storybook:serve-and-e2e
20+
pnpm run apps:storybook:serve-and-e2e

resources/ci-jenkins/bash/release-and-publish.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ echo 'git config user.email'
103103
git config user.email ${GITHUB_EMAIL}
104104
git config user.email
105105

106-
quiet_step "npm ci" npm ci --maxsockets 5
106+
corepack enable
107+
quiet_step "pnpm install" pnpm install --frozen-lockfile --network-concurrency 5
107108

108109
# web-types up-to-date brengen, semantic-release commit ze mee
109-
quiet_step "generate web-types" npm run libs:web-types:generate
110+
quiet_step "generate web-types" pnpm run libs:web-types:generate
110111

111112
if [[ ${RELEASE_BRANCH} == true ]];
112113
then
@@ -121,10 +122,10 @@ if [[ ${DEVELOP_BRANCH} == true ]];
121122
fi
122123

123124
echo "semantic-release - uitvoering"
124-
npx semantic-release --no-ci
125+
pnpm exec semantic-release --no-ci
125126

126127
echo "variabelen bepalen en zetten"
127-
NEXT_RELEASE_VERSION=$(npm pkg get version | sed 's/"//g')
128+
NEXT_RELEASE_VERSION=$(pnpm pkg get version | sed 's/"//g')
128129
echo using ${NEXT_RELEASE_VERSION} as NEXT_RELEASE_VERSION
129130

130131
# de feitelijke release actie is afhankelijk van de branch
@@ -133,16 +134,16 @@ echo using ${NEXT_RELEASE_VERSION} as NEXT_RELEASE_VERSION
133134
if [[ ${RELEASE_BRANCH} == true ]];
134135
then
135136
echo "publiceren van de npm packages naar de DOMG 'local-npm' repository"
136-
npm run libs:pack:release -- ${NEXT_RELEASE_VERSION}
137-
npm run libs:publish -- ${NEXT_RELEASE_VERSION}
137+
pnpm run libs:pack:release ${NEXT_RELEASE_VERSION}
138+
pnpm run libs:publish ${NEXT_RELEASE_VERSION}
138139
echo "publiceren van de npm packages naar de DOMG 'local-npm' repository - success"
139140
fi
140141

141142
if [[ ${DEVELOP_BRANCH} == true ]];
142143
then
143144
echo "publiceren van de npm packages naar de DOMG 'snapshot-npm' repository"
144-
npm run libs:pack:develop -- ${NEXT_RELEASE_VERSION}
145-
npm run libs:publish -- ${NEXT_RELEASE_VERSION}
145+
pnpm run libs:pack:develop ${NEXT_RELEASE_VERSION}
146+
pnpm run libs:publish ${NEXT_RELEASE_VERSION}
146147
echo "publiceren van de npm packages naar de DOMG 'snapshot-npm' repository - success"
147148
fi
148149

@@ -170,7 +171,7 @@ fi
170171
cd ..
171172

172173
echo "rebuild storybook - because only now CHANGELOG.md is up-to-date"
173-
npm run apps:storybook:build
174+
pnpm run apps:storybook:build
174175

175176
# tgz van Storybook maken
176177
echo "tgz''en van Storybook"

resources/ci-jenkins/bash/unit-component-integrator-tests.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
88
cd "${SCRIPT_DIR}/../../.."
99
source "${SCRIPT_DIR}/lib/quiet-step.sh"
1010

11-
quiet_step "npm ci" npm ci --maxsockets 5
11+
corepack enable
12+
quiet_step "pnpm install" pnpm install --frozen-lockfile --network-concurrency 5
1213

1314
echo "create build folder with dummy text file - when everything goes well there is no build folder which fails the build"
1415
# -p: deze stage draait in een eigen workspace, maar -p houdt het script ook bruikbaar bij een lokale herhaalde run waar build/ al bestaat
1516
mkdir -p build
1617
touch build/dummy.txt
1718

1819
# CI=true laat de jest-configs ook JUnit XML schrijven naar test-results, waar de junit-step van deze stage ze oppikt (zie jest.config.ts in libs/*)
19-
quiet_step "run all jest (unit) tests" env CI=true npm run libs:jest
20+
quiet_step "run all jest (unit) tests" env CI=true pnpm run libs:jest
2021

21-
# de 'npm run' hieronder streamt de output naar de console (zie lib/quiet-step.sh): ze duren lang, bij een crash of OOM wil je zien hoe ver hij geraakt was
22+
# de 'pnpm run' hieronder streamt de output naar de console (zie lib/quiet-step.sh): ze duren lang, bij een crash of OOM wil je zien hoe ver hij geraakt was
2223
echo "run all web component tests (cypress)"
23-
npm run libs:component-tests:run
24+
pnpm run libs:component-tests:run
2425

2526
echo "run datepicker anchor-positioning tests in Firefox (cypress)"
26-
npm run libs:component-tests:run-firefox-anchor
27+
pnpm run libs:component-tests:run-firefox-anchor
2728

2829
echo "run the integrator e2e tests (cypress)"
29-
npm run apps:integrator:serve-and-e2e
30+
pnpm run apps:integrator:serve-and-e2e

resources/ci-jenkins/bash/verify-release.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,32 @@ echo "Branch verificatie OK: ${CURRENT_BRANCH}"
3030

3131
# versie bepalen uit de components package.json - uit de gedeelde workspace waarin release-and-publish net gedraaid heeft
3232
cd ./build/dist/libs/components
33-
NEXT_RELEASE_VERSION=$(npm pkg get version | sed 's/"//g')
33+
NEXT_RELEASE_VERSION=$(pnpm pkg get version | sed 's/"//g')
3434
echo "Using ${NEXT_RELEASE_VERSION} as NEXT_RELEASE_VERSION"
3535
cd ../../../..
3636

37-
quiet_step "npm ci" npm ci --maxsockets 5
37+
corepack enable
38+
quiet_step "pnpm install" pnpm install --frozen-lockfile --network-concurrency 5
3839

3940
# consumer app dependencies updaten naar de ge-releaste versie
4041
echo "update consumer-app dependencies to version ${NEXT_RELEASE_VERSION}"
4142
cd apps/consumer
42-
npm pkg set "dependencies.@domg-wc/components=${NEXT_RELEASE_VERSION}"
43-
npm pkg set "dependencies.@domg-wc/map=${NEXT_RELEASE_VERSION}"
43+
pnpm pkg set "dependencies.@domg-wc/components=${NEXT_RELEASE_VERSION}"
44+
pnpm pkg set "dependencies.@domg-wc/map=${NEXT_RELEASE_VERSION}"
4445

4546
# Controleer of de placeholder nog aanwezig is
4647
if grep -q "DOMG-WC-VERSION" package.json; then
4748
echo "ERROR: Version placeholder in 'apps/consumer/package.json' was not replaced!" >&2
4849
exit 1
4950
fi
5051

51-
quiet_step "consumer npm install" npm install
52+
quiet_step "consumer pnpm install" pnpm install --no-frozen-lockfile
5253

5354
echo "build consumer-named app"
54-
npm run consumer:named:build
55+
pnpm run consumer:named:build
5556

5657
echo "build consumer-side-effect app"
57-
npm run consumer:side-effect:build
58+
pnpm run consumer:side-effect:build
5859

5960
# fat-lib klaarzetten voor lokale serve
6061
cd ../..
@@ -74,13 +75,13 @@ echo "copy fat-lib to consumer-fat-lib - success"
7475
cd apps/consumer
7576

7677
echo "running consumer-named serve-and-e2e"
77-
npm run consumer:named:serve-and-e2e
78+
pnpm run consumer:named:serve-and-e2e
7879

7980
echo "running consumer-side-effect serve-and-e2e"
80-
npm run consumer:side-effect:serve-and-e2e
81+
pnpm run consumer:side-effect:serve-and-e2e
8182

8283
echo "running consumer-fat-lib serve-and-e2e"
83-
npm run consumer:fat-lib:serve-and-e2e
84+
pnpm run consumer:fat-lib:serve-and-e2e
8485

8586
cd ../..
8687

0 commit comments

Comments
 (0)