Skip to content

Commit

Permalink
Add blue-green deployments to sqs cdk template (#1327)
Browse files Browse the repository at this point in the history
* bundle cdk

* remove env variable

* optimise

* set externalModules

* add hotswap

* Create rude-bobcats-unite.md

* Run `skuba format`

* introduce hotswap

* add watch

* Update rude-bobcats-unite.md

* Run `skuba format`

* add commas

* add blue green

* add missing deps

* Update nine-coins-hear.md

* simplify

* add more packages

* fix errors

* add timeout 30

* update snapshot

* add hooks

* add cleanup

* update changeset

* simplify PR

* update

* tweak changeset

* remove extra dep

* revert

* update snapshot

* fix promise

* mock time

* fixes

* lint

* add empty return

* fix snapshot

* update snap

* remove layer pruning

* update snap

* Update nine-coins-hear.md

* Update template/lambda-sqs-worker-cdk/infra/appStack.ts

* Update app.ts

* Update nine-coins-hear.md

* Update appStack.ts

* add bash

* Update snapshots

* apply recommendations

* Try something

* Run `skuba format`

* Comment out SNS construct

* Try removing `as const`

* Run `skuba format`

* More commented out code :)

* Update snapshot

* Hmm

* Switch to `skuba node`

* Hoist esbuild for now

* Simplify with `addAlias`

* Update snapshot

* Update snapshot

* Uncomment SNS topic integration

---------

Co-authored-by: skuba <[email protected]>
Co-authored-by: Ryan Ling <[email protected]>
  • Loading branch information
3 people committed Jan 8, 2024
1 parent 919ce0f commit 8b741af
Show file tree
Hide file tree
Showing 12 changed files with 1,774 additions and 93 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-coins-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

template/lambda-sqs-worker-cdk: Add blue-green deployment, smoke test and version pruning functionality
1 change: 1 addition & 0 deletions template/base/_.npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
public-hoist-pattern[]=@types*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=esbuild
public-hoist-pattern[]=tsconfig-seek
# end managed by skuba
3 changes: 3 additions & 0 deletions template/lambda-sqs-worker-cdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

FROM --platform=${BUILDPLATFORM:-<%- platformName %>} node:20-alpine AS dev-deps

# Needed for cdk
RUN apk add --no-cache bash

RUN corepack enable pnpm
RUN pnpm config set store-dir /root/.pnpm-store

Expand Down
8 changes: 5 additions & 3 deletions template/lambda-sqs-worker-cdk/cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "npx ts-node infra/index.ts",
"app": "pnpm exec skuba node infra/index.ts",
"context": {
"global": {
"appName": "<%- serviceName %>"
Expand All @@ -10,15 +10,17 @@
"environment": {
"SOMETHING": "dev"
}
}
},
"sourceSnsTopicArn": "TODO: sourceSnsTopicArn"
},
"prod": {
"workerLambda": {
"reservedConcurrency": 2,
"environment": {
"SOMETHING": "prod"
}
}
},
"sourceSnsTopicArn": "TODO: sourceSnsTopicArn"
}
},
"progress": "events",
Expand Down
Loading

0 comments on commit 8b741af

Please sign in to comment.