Skip to content

Commit 8137055

Browse files
committed
Add pnpm version support to CI/CD pipeline configuration
1 parent e38d5e3 commit 8137055

6 files changed

Lines changed: 84 additions & 4 deletions

File tree

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
build_timestamp: ${{ steps.variables.outputs.build_timestamp }}
2323
build_epoch: ${{ steps.variables.outputs.build_epoch }}
2424
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
25+
pnpm_version: ${{ steps.variables.outputs.pnpm_version }}
2526
python_version: ${{ steps.variables.outputs.python_version }}
2627
terraform_version: ${{ steps.variables.outputs.terraform_version }}
2728
version: ${{ steps.variables.outputs.version }}
@@ -44,6 +45,7 @@ jobs:
4445
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
4546
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
4647
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
48+
echo "pnpm_version=$(grep "^pnpm\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4749
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4850
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4951
echo "version=$(echo $version)" >> $GITHUB_OUTPUT
@@ -97,6 +99,7 @@ jobs:
9799
export BUILD_TIMESTAMP="${{ steps.variables.outputs.build_timestamp }}"
98100
export BUILD_EPOCH="${{ steps.variables.outputs.build_epoch }}"
99101
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
102+
export PNPM_VERSION="${{ steps.variables.outputs.pnpm_version }}"
100103
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
101104
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
102105
export VERSION="${{ steps.variables.outputs.version }}"
@@ -112,6 +115,7 @@ jobs:
112115
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
113116
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
114117
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
118+
pnpm_version: "${{ needs.metadata.outputs.pnpm_version }}"
115119
python_version: "${{ needs.metadata.outputs.python_version }}"
116120
#TODO - Re-visit Trivy usage https://nhsd-jira.digital.nhs.uk/browse/CCM-15549
117121
# skip_trivy_package: ${{ needs.metadata.outputs.skip_trivy_package == 'true' }}
@@ -127,6 +131,7 @@ jobs:
127131
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
128132
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
129133
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
134+
pnpm_version: "${{ needs.metadata.outputs.pnpm_version }}"
130135
python_version: "${{ needs.metadata.outputs.python_version }}"
131136
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
132137
version: "${{ needs.metadata.outputs.version }}"
@@ -141,6 +146,7 @@ jobs:
141146
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
142147
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
143148
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
149+
pnpm_version: "${{ needs.metadata.outputs.pnpm_version }}"
144150
python_version: "${{ needs.metadata.outputs.python_version }}"
145151
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
146152
version: "${{ needs.metadata.outputs.version }}"
@@ -155,6 +161,7 @@ jobs:
155161
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
156162
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
157163
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
164+
pnpm_version: "${{ needs.metadata.outputs.pnpm_version }}"
158165
python_version: "${{ needs.metadata.outputs.python_version }}"
159166
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
160167
version: "${{ needs.metadata.outputs.version }}"

.github/workflows/cicd-3-deploy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
build_timestamp: ${{ steps.variables.outputs.build_timestamp }}
3232
build_epoch: ${{ steps.variables.outputs.build_epoch }}
3333
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
34+
pnpm_version: ${{ steps.variables.outputs.pnpm_version }}
3435
python_version: ${{ steps.variables.outputs.python_version }}
3536
terraform_version: ${{ steps.variables.outputs.terraform_version }}
3637
version: ${{ steps.variables.outputs.version }}
@@ -46,6 +47,7 @@ jobs:
4647
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
4748
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
4849
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
50+
echo "pnpm_version=$(grep "^pnpm\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4951
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
5052
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
5153
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
@@ -56,6 +58,7 @@ jobs:
5658
export BUILD_TIMESTAMP="${{ steps.variables.outputs.build_timestamp }}"
5759
export BUILD_EPOCH="${{ steps.variables.outputs.build_epoch }}"
5860
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
61+
export PNPM_VERSION="${{ steps.variables.outputs.pnpm_version }}"
5962
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
6063
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
6164
export VERSION="${{ steps.variables.outputs.version }}"

.github/workflows/stage-1-commit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Node.js version, set by the CI/CD pipeline workflow"
2020
required: true
2121
type: string
22+
pnpm_version:
23+
description: "pnpm version, set by the CI/CD pipeline workflow"
24+
required: true
25+
type: string
2226
python_version:
2327
description: "Python version, set by the CI/CD pipeline workflow"
2428
required: true

.github/workflows/stage-2-test.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Node.js version, set by the CI/CD pipeline workflow"
2020
required: true
2121
type: string
22+
pnpm_version:
23+
description: "pnpm version, set by the CI/CD pipeline workflow"
24+
required: true
25+
type: string
2226
python_version:
2327
description: "Python version, set by the CI/CD pipeline workflow"
2428
required: true
@@ -50,7 +54,8 @@ jobs:
5054
- name: "Setup pnpm"
5155
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
5256
with:
53-
version: 10.33.0
57+
version: "${{ inputs.pnpm_version }}"
58+
cache: true
5459
- name: "Use Node.js"
5560
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
5661
with:
@@ -73,7 +78,8 @@ jobs:
7378
- name: "Setup pnpm"
7479
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
7580
with:
76-
version: 10.33.0
81+
version: "${{ inputs.pnpm_version }}"
82+
cache: true
7783
- name: "Use Node.js"
7884
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
7985
with:
@@ -110,7 +116,8 @@ jobs:
110116
- name: "Setup pnpm"
111117
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
112118
with:
113-
version: 10.33.0
119+
version: "${{ inputs.pnpm_version }}"
120+
cache: true
114121
- name: "Use Node.js"
115122
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
116123
with:
@@ -135,7 +142,8 @@ jobs:
135142
- name: "Setup pnpm"
136143
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
137144
with:
138-
version: 10.33.0
145+
version: "${{ inputs.pnpm_version }}"
146+
cache: true
139147
- name: "Use Node.js"
140148
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
141149
with:

.github/workflows/stage-3-build.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Node.js version, set by the CI/CD pipeline workflow"
2020
required: true
2121
type: string
22+
pnpm_version:
23+
description: "pnpm version, set by the CI/CD pipeline workflow"
24+
required: true
25+
type: string
2226
python_version:
2327
description: "Python version, set by the CI/CD pipeline workflow"
2428
required: true
@@ -40,6 +44,11 @@ jobs:
4044
steps:
4145
- name: "Checkout code"
4246
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
47+
- name: "Setup pnpm"
48+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
49+
with:
50+
version: "${{ inputs.pnpm_version }}"
51+
cache: true
4352
- name: "Build docs"
4453
uses: ./.github/actions/build-docs
4554
with:

.github/workflows/stage-4-acceptance.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Node.js version, set by the CI/CD pipeline workflow"
2020
required: true
2121
type: string
22+
pnpm_version:
23+
description: "pnpm version, set by the CI/CD pipeline workflow"
24+
required: true
25+
type: string
2226
python_version:
2327
description: "Python version, set by the CI/CD pipeline workflow"
2428
required: true
@@ -40,6 +44,11 @@ jobs:
4044
steps:
4145
- name: "Checkout code"
4246
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
47+
- name: "Setup pnpm"
48+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
49+
with:
50+
version: "${{ inputs.pnpm_version }}"
51+
cache: true
4352
- name: "Create infractructure"
4453
run: |
4554
echo "Creating infractructure..."
@@ -57,6 +66,11 @@ jobs:
5766
steps:
5867
- name: "Checkout code"
5968
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
69+
- name: "Setup pnpm"
70+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
71+
with:
72+
version: "${{ inputs.pnpm_version }}"
73+
cache: true
6074
- name: "Run contract test"
6175
run: |
6276
make test-contract
@@ -71,6 +85,11 @@ jobs:
7185
steps:
7286
- name: "Checkout code"
7387
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
88+
- name: "Setup pnpm"
89+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
90+
with:
91+
version: "${{ inputs.pnpm_version }}"
92+
cache: true
7493
- name: "Run security test"
7594
run: |
7695
make test-security
@@ -85,6 +104,11 @@ jobs:
85104
steps:
86105
- name: "Checkout code"
87106
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
107+
- name: "Setup pnpm"
108+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
109+
with:
110+
version: "${{ inputs.pnpm_version }}"
111+
cache: true
88112
- name: "Run UI test"
89113
run: |
90114
make test-ui
@@ -99,6 +123,11 @@ jobs:
99123
steps:
100124
- name: "Checkout code"
101125
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
126+
- name: "Setup pnpm"
127+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
128+
with:
129+
version: "${{ inputs.pnpm_version }}"
130+
cache: true
102131
- name: "Run UI performance test"
103132
run: |
104133
make test-ui-performance
@@ -113,6 +142,11 @@ jobs:
113142
steps:
114143
- name: "Checkout code"
115144
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
145+
- name: "Setup pnpm"
146+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
147+
with:
148+
version: "${{ inputs.pnpm_version }}"
149+
cache: true
116150
- name: "Run integration test"
117151
run: |
118152
make test-integration
@@ -127,6 +161,11 @@ jobs:
127161
steps:
128162
- name: "Checkout code"
129163
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
164+
- name: "Setup pnpm"
165+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
166+
with:
167+
version: "${{ inputs.pnpm_version }}"
168+
cache: true
130169
- name: "Run accessibility test"
131170
run: |
132171
make test-accessibility
@@ -141,6 +180,11 @@ jobs:
141180
steps:
142181
- name: "Checkout code"
143182
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
183+
- name: "Setup pnpm"
184+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
185+
with:
186+
version: "${{ inputs.pnpm_version }}"
187+
cache: true
144188
- name: "Run load tests"
145189
run: |
146190
make test-load
@@ -165,6 +209,11 @@ jobs:
165209
steps:
166210
- name: "Checkout code"
167211
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
212+
- name: "Setup pnpm"
213+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
214+
with:
215+
version: "${{ inputs.pnpm_version }}"
216+
cache: true
168217
- name: "Tear down environment"
169218
run: |
170219
echo "Tearing down environment..."

0 commit comments

Comments
 (0)