Skip to content

Commit d9a606a

Browse files
authored
Merge pull request #1569 from guardian/aa/cdk-report
feat(report): Initial CDK version
2 parents f2b6e12 + 898e780 commit d9a606a

6 files changed

Lines changed: 1569 additions & 2 deletions

File tree

.github/workflows/report.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ jobs:
3232
- name: Setup JDK and sbt
3333
uses: guardian/setup-scala@v1
3434

35+
- run: corepack enable
36+
- uses: actions/setup-node@v6
37+
with:
38+
cache: yarn
39+
cache-dependency-path: cdk/yarn.lock
40+
node-version-file: .nvmrc
41+
- name: CDK synth
42+
run: |
43+
cd cdk
44+
yarn install --immutable
45+
yarn lint
46+
yarn test
47+
yarn synth
48+
3549
- name: Compile, test and package
3650
run: sbt "project common" "compile" "test" "project report" "compile" "test" "debian:packageBin"
3751

@@ -57,4 +71,5 @@ jobs:
5771
report:
5872
- report/target/report_1.0-latest_all.deb
5973
report-cfn:
60-
- report/conf/report.yaml
74+
- cdk/cdk.out/Report-CODE.template.json
75+
- cdk/cdk.out/Report-PROD.template.json

cdk/bin/cdk.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { GuStackProps } from '@guardian/cdk/lib/constructs/core';
33
import { App } from 'aws-cdk-lib';
44
import { Registration } from '../lib/registration';
55
import { RegistrationsDbProxy } from '../lib/registrations-db-proxy';
6+
import { Report, type ReportProps } from '../lib/report';
67
import { SenderWorkerStack } from '../lib/senderworker';
78
import { SloMonitoring } from '../lib/slo-monitoring';
89

@@ -65,3 +66,19 @@ new SenderWorkerStack(app, 'SenderWorkerStack-PROD', {
6566
stack: 'mobile-notifications-workers',
6667
stage: 'PROD',
6768
});
69+
70+
export const reportPropsCode: ReportProps = {
71+
cloudFormationStackName: 'mobile-notifications-report-CODE',
72+
stack: 'mobile-notifications',
73+
stage: 'CODE',
74+
app: 'report',
75+
};
76+
new Report(app, 'Report-CODE', reportPropsCode);
77+
78+
export const reportPropsProd: ReportProps = {
79+
cloudFormationStackName: 'mobile-notifications-report-PROD',
80+
stack: 'mobile-notifications',
81+
stage: 'PROD',
82+
app: 'report',
83+
};
84+
new Report(app, 'Report-PROD', reportPropsProd);

0 commit comments

Comments
 (0)