在AWS Codestar中,如何将分支部署配置到特定环境?
问题描述:
我刚创建了一个全新的AWS Codestar项目。在AWS Codestar中,如何将分支部署配置到特定环境?
据我所知,Codestar只是一个集成了多个AWS产品的仪表板。
有一件事我不知道如何配置,它是分支部署。
在我的git仓库,我有3个分支:master
,develop
和staging
在一个理想的世界,master
部署到生产,develop
的开发环境和staging
到QA环境。
我不知道如何使用AWS配置此管道,但我一直无法找到其开发人员门户中的相关文档。
这是我buildspec.yml
文件,以防万一可以配置有:
version: 0.2
phases:
install:
commands:
- echo Installing NPM Packages...
- npm install
build:
commands:
- aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template template-export.yml
artifacts:
type: zip
files:
- template-export.yml
这是一个使用AWS API网关将请求路由到AWS lambda函数,如果该事项的项目。