Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lambda runtime was not v14 #2

Merged
merged 5 commits into from
Mar 18, 2021
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
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Synthesize project files
run: npx projen
- name: Anti-tamper check
run: git diff --exit-code
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.email "[email protected]"
- name: Build
run: npx projen build
- name: Anti-tamper check
run: git diff --exit-code
- name: Commit and push changes (if any)
run: 'git diff --exit-code || (git commit -am "chore: self mutation" && git push
origin HEAD:${{ github.event.pull_request.head.ref }})'
container:
image: jsii/superchain
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ jobs:
- name: Anti-tamper check
run: git diff --exit-code
- name: Push commits
run: git push origin $BRANCH
env:
BRANCH: ${{ github.ref }}
run: git push origin HEAD:${{ github.ref }}
- name: Push tags
run: git push --follow-tags origin $BRANCH
env:
BRANCH: ${{ github.ref }}
run: git push --follow-tags origin ${{ github.ref }}
- name: Upload artifact
uses: actions/[email protected]
with:
Expand Down
7 changes: 6 additions & 1 deletion .projen/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"name": "@typescript-eslint/parser",
"type": "build"
},
{
"name": "esbuild",
"version": "^0.9.3",
"type": "build"
},
{
"name": "eslint",
"type": "build"
Expand Down Expand Up @@ -104,7 +109,7 @@
},
{
"name": "projen",
"version": "^0.17.6",
"version": "^0.17.16",
"type": "build"
},
{
Expand Down
3 changes: 3 additions & 0 deletions .projen/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
"category": "00.build",
"description": "Full release build (test+compile)",
"steps": [
{
"exec": "node --version"
},
{
"spawn": "test"
},
Expand Down
3 changes: 3 additions & 0 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const project = new pj.AwsCdkConstructLibrary({
],

devDeps: [
'esbuild@^0.9.3',
'ts-node@9',
'@types/node@14',
'@aws-sdk/client-cloudformation@3',
Expand All @@ -62,6 +63,8 @@ const project = new pj.AwsCdkConstructLibrary({

project.gitignore.exclude('cdk.out');

project.buildTask.prependExec('node --version');

const yarnUp = project.github.addWorkflow('yarn-upgrade');

yarnUp.on({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@types/node": "14",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"esbuild": "^0.9.3",
"eslint": "^7.22.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.4.0",
Expand All @@ -51,7 +52,7 @@
"jsii-docgen": "^1.8.67",
"jsii-pacmak": "^1.24.0",
"json-schema": "^0.3.0",
"projen": "^0.17.6",
"projen": "^0.17.16",
"standard-version": "^9",
"ts-jest": "^26.5.3",
"ts-node": "9",
Expand Down
1 change: 1 addition & 0 deletions src/fallback-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class FallbackPolicy extends cdk.Construct {
[PRIMARY_SERVICE_ARN_ENV]: props.primaryService.serviceArn,
[FALLBACK_SERVICE_ARN_ENV]: props.fallbackService.serviceArn,
},
runtime: lambda.Runtime.NODEJS_14_X,
logRetention: logRetention,
initialPolicy: [
new iam.PolicyStatement({
Expand Down
Loading