-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (88 loc) · 3.07 KB
/
monitoring-CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Monitoring CI
on:
push:
branches-ignore:
- 'gh-pages'
jobs:
CI:
runs-on: ubuntu-latest
permissions:
contents: read
# required for guardian/actions-riff-raff
id-token: write
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 'latest'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: './monitoring/.nvmrc'
cache: pnpm
cache-dependency-path: |
monitoring/pnpm-lock.yaml
cdk/pnpm-lock.yaml
- name: Lambda Install CDK dependencies
working-directory: './monitoring'
run: pnpm install --frozen-lockfile
- name: Lambda lint
working-directory: './monitoring'
run: pnpm lint
- name: Lambda type-check
working-directory: './monitoring'
run: pnpm type-check
- name: Lambda Build
working-directory: './monitoring'
run: pnpm build
- name: Lambda Test
working-directory: './monitoring'
run: pnpm test
- name: CDK Install CDK dependencies
working-directory: './cdk'
run: pnpm install --frozen-lockfile
- name: CDK Test
working-directory: './cdk'
run: pnpm test
- name: CDK lint
working-directory: './cdk'
run: pnpm lint
- name: CDK Build
working-directory: './cdk'
run: pnpm build
- name: CDK Synth
working-directory: './cdk'
run: pnpm synth
- name: ZIP Lambda files
working-directory: './cdk'
run: ./script/export-monitoring-file
- name: Upload to Riff Raff
uses: guardian/actions-riff-raff@v4
with:
app: cmp-monitoring
projectName: consent::cmp-monitoring
buildNumberOffset: 1463
dryRun: false
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: riff-raff.yaml
contentDirectories: |
cmp-monitoring-lambda-eu-west-1:
- cdk/dist/cmp-monitoring-lambda.zip
cmp-monitoring-lambda-us-west-1:
- cdk/dist/cmp-monitoring-lambda.zip
cmp-monitoring-lambda-ap-southeast-2:
- cdk/dist/cmp-monitoring-lambda.zip
cmp-monitoring-lambda-ca-central-1:
- cdk/dist/cmp-monitoring-lambda.zip
cloud-formation:
- cdk/cdk.out/CmpMonitoringStackEUCode.template.json
- cdk/cdk.out/CmpMonitoringStackEUProd.template.json
- cdk/cdk.out/CmpMonitoringStackUSCode.template.json
- cdk/cdk.out/CmpMonitoringStackUSProd.template.json
- cdk/cdk.out/CmpMonitoringStackAPCode.template.json
- cdk/cdk.out/CmpMonitoringStackAPProd.template.json
- cdk/cdk.out/CmpMonitoringStackCACode.template.json
- cdk/cdk.out/CmpMonitoringStackCAProd.template.json