Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/fake-breaking-news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Fake breaking news lambda
on:
push:
paths:
- cdk/**
- fakebreakingnewslambda/**
- common/**
- commoneventconsumer/**
Expand Down Expand Up @@ -37,6 +38,22 @@ jobs:
- name: Copy jar to root
run: cp fakebreakingnewslambda/target/scala-*/fakebreakingnewslambda.jar .

- run: corepack enable

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
cache: yarn
cache-dependency-path: cdk/yarn.lock
node-version-file: .nvmrc

- name: CDK synth
run: |
cd cdk
yarn install --immutable
yarn lint
yarn test
yarn synth

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v4
with:
Expand All @@ -45,8 +62,10 @@ jobs:
projectName: mobile-n10n:fakebreakingnewslambda
buildNumberOffset: 4147
configPath: fakebreakingnewslambda/riff-raff.yaml

contentDirectories: |
fakebreakingnewslambda:
- fakebreakingnewslambda.jar
fakebreakingnewslambda-cfn:
- fakebreakingnewslambda/fakebreakingnewslambda-cfn.yaml
- cdk/cdk.out/FakeBreakingNewsLambda-CODE.template.json
- cdk/cdk.out/FakeBreakingNewsLambda-PROD.template.json
25 changes: 25 additions & 0 deletions cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'source-map-support/register';
import type { GuStackProps } from '@guardian/cdk/lib/constructs/core';
import { App, Duration } from 'aws-cdk-lib';
import { FakeBreakingNewsLambda } from '../lib/fakebreakingnewslambda';
import type { NotificationProps } from '../lib/notification';
import { Notification } from '../lib/notification';
import type { RegistrationProps } from '../lib/registration';
Expand Down Expand Up @@ -140,3 +142,26 @@ export const reportPropsProd: ReportProps = {
buildIdentifier: process.env.BUILD_NUMBER ?? 'DEV',
};
new Report(app, 'Report-PROD', reportPropsProd);

export const fakeBreakingNewsCodeProps: GuStackProps = {
app: 'fakebreakingnews',
stack: 'mobile-notifications-fake-breaking-news',
stage: 'CODE',
};

export const fakeBreakingNewsProdProps: GuStackProps = {
app: 'fakebreakingnews',
stack: 'mobile-notifications-fake-breaking-news',
stage: 'PROD',
};

new FakeBreakingNewsLambda(
app,
'FakeBreakingNewsLambda-CODE',
fakeBreakingNewsCodeProps,
);
new FakeBreakingNewsLambda(
app,
'FakeBreakingNewsLambda-PROD',
fakeBreakingNewsProdProps,
);
Loading