Skip to content

Commit ee0b12f

Browse files
Merge pull request #1703 from guardian/football-lambda-yaml-in-cdk
feat(footballnotificationslambda): GuCDK defined lambda
2 parents 50cb1f6 + c254414 commit ee0b12f

File tree

7 files changed

+925
-5
lines changed

7 files changed

+925
-5
lines changed

.github/workflows/football.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Football
33
on:
44
push:
55
paths:
6+
- cdk/**
67
- football/**
78
- api-models/**
89
- project/**
@@ -46,6 +47,22 @@ jobs:
4647
- name: Copy jar to root
4748
run: cp football/target/scala-*/football.jar .
4849

50+
- run: corepack enable
51+
52+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
53+
with:
54+
cache: yarn
55+
cache-dependency-path: cdk/yarn.lock
56+
node-version-file: .nvmrc
57+
58+
- name: CDK synth
59+
run: |
60+
cd cdk
61+
yarn install --immutable
62+
yarn lint
63+
yarn test
64+
yarn synth
65+
4966
- name: Upload to riff-raff
5067
uses: guardian/actions-riff-raff@v4
5168
with:
@@ -54,8 +71,10 @@ jobs:
5471
projectName: mobile-n10n:football
5572
buildNumberOffset: 4147
5673
configPath: football/riff-raff.yaml
74+
5775
contentDirectories: |
5876
football:
5977
- football.jar
6078
mobile-notifications-football-cfn:
61-
- football/cfn.yaml
79+
- cdk/cdk.out/FootballNotificationsLambda-CODE.template.json
80+
- cdk/cdk.out/FootballNotificationsLambda-PROD.template.json

cdk/bin/cdk.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { GuStackProps } from '@guardian/cdk/lib/constructs/core';
22
import { App, Duration } from 'aws-cdk-lib';
33
import 'source-map-support/register';
44
import { FakeBreakingNewsLambda } from '../lib/fakebreakingnewslambda';
5+
import { FootballNotificationsLambda } from '../lib/footballnotificationslambda';
56
import type { NotificationProps } from '../lib/notification';
67
import { Notification } from '../lib/notification';
78
import type { RegistrationProps } from '../lib/registration';
@@ -163,3 +164,25 @@ new FakeBreakingNewsLambda(
163164
'FakeBreakingNewsLambda-PROD',
164165
fakeBreakingNewsProdProps,
165166
);
167+
168+
export const footballNotificationsCodeProps: GuStackProps = {
169+
stack: 'mobile-notifications',
170+
stage: 'CODE',
171+
};
172+
173+
export const footballNotificationsProdProps: GuStackProps = {
174+
stack: 'mobile-notifications',
175+
stage: 'PROD',
176+
};
177+
178+
new FootballNotificationsLambda(
179+
app,
180+
'FootballNotificationsLambda-CODE',
181+
footballNotificationsCodeProps,
182+
);
183+
184+
new FootballNotificationsLambda(
185+
app,
186+
'FootballNotificationsLambda-PROD',
187+
footballNotificationsProdProps,
188+
);

0 commit comments

Comments
 (0)