Skip to content

Commit

Permalink
Build lambda-sqs-worker-cdk before deploy (#428)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Ling <[email protected]>
  • Loading branch information
damienung1 and 72636c authored May 24, 2021
1 parent a0e8f20 commit 8842f92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .changeset/lucky-pants-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': patch
---

**template/lambda-sqs-worker-cdk:** Always build before deploy

This prevents stale compiled code from being cached and deployed from ECR.
8 changes: 6 additions & 2 deletions template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,30 @@ steps:
- echo "--- Running yarn test :jest:"
- yarn test

- label: 'CDK Deploy Staging :shipit:'
- label: 'Build & CDK Deploy Staging :shipit:'
<<: *dev-agent
plugins:
<<: *plugins
depends_on:
- test
command:
- echo "--- Building code"
- yarn build
- echo "--- Running CDK deploy to staging"
- yarn deploy:dev
concurrency: 1
concurrency_group: '<%- repoName %>/deploy/dev'

- label: 'CDK Deploy Production :shipit:'
- label: 'Build & CDK Deploy Production :shipit:'
branches: 'master'
<<: *prod-agent
plugins:
<<: *plugins
depends_on:
- test
command:
- echo "--- Building code"
- yarn build
- echo "--- Running CDK deploy to production"
- yarn deploy:prod
concurrency: 1
Expand Down
8 changes: 0 additions & 8 deletions template/lambda-sqs-worker-cdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@ FROM node:14-alpine AS dev-deps
WORKDIR /workdir

COPY --from=unsafe-dev-deps /workdir .

###

FROM dev-deps AS build

COPY . .

RUN yarn build

0 comments on commit 8842f92

Please sign in to comment.