-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from getcft/release-2.0
Upgrading to Node 18 and Serverless 3.38.0
- Loading branch information
Showing
8 changed files
with
45 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,32 +3,25 @@ version: 0.2 | |
phases: | ||
install: | ||
commands: | ||
#- rm package-lock.json | ||
- npm install --silent --progress=false -g npm | ||
- n 18.19.0 | ||
|
||
## Dependencies | ||
- npm install --silent --progress-false | ||
- npm --version | ||
- npm install --silent --progress=false -g serverless | ||
- npm install --silent --progress=false -g [email protected] | ||
- npm install --silent --save–dev serverless-stack-output | ||
|
||
build: | ||
commands: | ||
## Integration test environment | ||
#- serverless deploy --stage test -v | ||
- mkdir artifacts | ||
- mkdir artifacts/stg | ||
- serverless package --package artifacts/dev --stage dev -v | ||
## Tests | ||
|
||
post_build: | ||
commands: | ||
## Remove integration testing environment | ||
#- serverless remove --stage test -v | ||
## Post build commands | ||
|
||
artifacts: | ||
files: | ||
- artifacts/**/* | ||
- serverless.yml | ||
- deploy.sh | ||
- index.js | ||
- package.json | ||
- package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,32 +3,25 @@ version: 0.2 | |
phases: | ||
install: | ||
commands: | ||
#- rm package-lock.json | ||
- npm install --silent --progress=false -g npm | ||
- n 18.19.0 | ||
|
||
## Dependencies | ||
- npm install --silent --progress-false | ||
- npm --version | ||
- npm install --silent --progress=false -g serverless | ||
- npm install --silent --progress=false -g [email protected] | ||
- npm install --silent --save–dev serverless-stack-output | ||
|
||
build: | ||
commands: | ||
## Integration test environment | ||
#- serverless deploy --stage test -v | ||
- mkdir artifacts | ||
- mkdir artifacts/prod | ||
- serverless package --package artifacts/prod --stage prod -v | ||
## Tests | ||
|
||
post_build: | ||
commands: | ||
## Remove integration testing environment | ||
#- serverless remove --stage test -v | ||
## Post build commands | ||
|
||
artifacts: | ||
files: | ||
- artifacts/**/* | ||
- serverless.yml | ||
- deploy.sh | ||
- index.js | ||
- package.json | ||
- package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,32 +3,25 @@ version: 0.2 | |
phases: | ||
install: | ||
commands: | ||
#- rm package-lock.json | ||
- npm install --silent --progress=false -g npm | ||
- n 18.19.0 | ||
|
||
## Dependencies | ||
- npm install --silent --progress-false | ||
- npm --version | ||
- npm install --silent --progress=false -g serverless | ||
- npm install --silent --progress=false -g [email protected] | ||
- npm install --silent --save–dev serverless-stack-output | ||
|
||
build: | ||
commands: | ||
## Integration test environment | ||
#- serverless deploy --stage test -v | ||
- mkdir artifacts | ||
- mkdir artifacts/stg | ||
- serverless package --package artifacts/stg --stage stg -v | ||
## Tests | ||
|
||
post_build: | ||
commands: | ||
## Remove integration testing environment | ||
#- serverless remove --stage test -v | ||
## Post build commands | ||
|
||
artifacts: | ||
files: | ||
- artifacts/**/* | ||
- serverless.yml | ||
- deploy.sh | ||
- index.js | ||
- package.json | ||
- package-lock.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright [2018] [Phil Chen] | ||
# Copyright [2024] [Phil Chen] | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -38,8 +38,8 @@ Parameters: | |
|
||
GitHubOAuthToken: | ||
Type: String | ||
Default: GitHub OAuthToken Here | ||
Description: CodePipeline requires an OAuthToken | ||
NoEcho: true | ||
Description: CodePipeline requires an GitHub OAuthToken | ||
|
||
Resources: | ||
|
||
|
@@ -80,58 +80,22 @@ Resources: | |
Statement: | ||
Effect: Allow | ||
Action: | ||
- logs:CreateLogGroup | ||
- logs:CreateLogStream | ||
- logs:PutLogEvents | ||
- logs:DescribeLogGroups | ||
- logs:FilterLogEvents | ||
- logs:DescribeLogStreams | ||
- logs:DeleteLogGroup | ||
- s3:putObject | ||
- s3:getObject | ||
- codebuild:* | ||
- 'cloudformation:List*' | ||
- 'cloudformation:Get*' | ||
- 'cloudformation:PreviewStackUpdate' | ||
- 'cloudformation:ValidateTemplate' | ||
- 'cloudformation:CreateStack' | ||
- 'cloudformation:CreateUploadBucket' | ||
- 'cloudformation:DeleteStack' | ||
- 'cloudformation:Describe*' | ||
- 'cloudformation:UpdateStack' | ||
- 'lambda:Get*' | ||
- 'lambda:List*' | ||
- 'lambda:CreateFunction' | ||
- 'lambda:AddPermission' | ||
- 'lambda:CreateAlias' | ||
- 'lambda:DeleteFunction' | ||
- 'lambda:InvokeFunction' | ||
- 'lambda:PublishVersion' | ||
- 'lambda:RemovePermission' | ||
- 'lambda:Update*' | ||
- 'apigateway:GET' | ||
- 'apigateway:POST' | ||
- 'apigateway:PUT' | ||
- 'apigateway:DELETE' | ||
- 's3:CreateBucket' | ||
- 's3:DeleteBucket' | ||
- 's3:ListBucket' | ||
- 's3:ListBucketVersions' | ||
- 's3:PutObject' | ||
- 's3:GetObject' | ||
- 's3:DeleteObject' | ||
- 'logs:*' | ||
- 'codebuild:*' | ||
- 'cloudformation:*' | ||
- 'lambda:*' | ||
- 'apigateway:*' | ||
- 's3:*' | ||
- 'iam:PassRole' | ||
- 'kinesis:*' | ||
- 'iam:GetRole' | ||
- 'iam:CreateRole' | ||
- 'iam:PutRolePolicy' | ||
- 'iam:DeleteRolePolicy' | ||
- 'iam:DeleteRole' | ||
- 'cloudwatch:GetMetricStatistics' | ||
- 'iam:TagRole' | ||
- 'events:Put*' | ||
- 'events:Remove*' | ||
- 'events:Delete*' | ||
- 'dynamodb:*' | ||
Resource: "*" | ||
Roles: | ||
- !Ref CodeBuildRole | ||
|
@@ -175,7 +139,7 @@ Resources: | |
Environment: | ||
Type: "LINUX_CONTAINER" | ||
ComputeType: BUILD_GENERAL1_SMALL | ||
Image: aws/codebuild/nodejs:10.1.0 | ||
Image: aws/codebuild/standard:7.0 | ||
Artifacts: | ||
Type: CODEPIPELINE | ||
|
||
|
@@ -193,15 +157,19 @@ Resources: | |
phases: | ||
build: | ||
commands: | ||
- bash deploy.sh | ||
- n 18.19.0 | ||
- npm install --silent --progress-false | ||
- npm install --silent --progress=false -g [email protected] | ||
- npm install --silent --save–dev serverless-stack-output | ||
- serverless deploy | ||
Environment: | ||
Type: "LINUX_CONTAINER" | ||
ComputeType: BUILD_GENERAL1_SMALL | ||
EnvironmentVariables: | ||
- Name: env | ||
Type: PLAINTEXT | ||
Value: !Ref Environment | ||
Image: aws/codebuild/nodejs:10.1.0 | ||
Image: aws/codebuild/standard:7.0 | ||
Artifacts: | ||
Type: CODEPIPELINE | ||
|
||
|
@@ -236,7 +204,7 @@ Resources: | |
OutputArtifacts: | ||
- Name: TheSourceCode | ||
|
||
# Stage 2: Build using Serverless Framework | ||
# Stage 2: Run Your Tests | ||
- Name: TestBuild | ||
Actions: | ||
- Name: Test-Build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ functions: | |
handler: index.handler | ||
events: | ||
- http: ANY / | ||
- http: 'ANY {proxy+}' | ||
- http: 'ANY /{proxy+}' |