简体   繁体   English

AWS Cloudformation 的版本控制和管道

[英]Version Control And Pipeline for AWS Cloudformation

I'm trying to figure out a way to come up with a CI/CD pipeline for CloudFormation.我正在尝试找出一种方法来为 CloudFormation 提供 CI/CD 管道。 We use Cloudformation Console directly to deploy our infrastructure and app to the cloud.我们直接使用 Cloudformation 控制台将我们的基础架构和应用程序部署到云端。

Does anyone have any examples of how they have created a CI/CD pipeline using Jenkins or other types of CI tools to do some type of linting, CI, version control, and artifact deployment to Artifactory (or similar toolset)?有没有人有任何示例说明他们如何使用 Jenkins 或其他类型的 CI 工具创建 CI/CD 管道,以对 Artifactory(或类似工具集)进行某种类型的 linting、CI、版本控制和工件部署? I'd like to execute a pipeline once a new version of the cloud formation templates is uploaded to Artifactory.一旦将新版本的云形成模板上传到 Artifactory,我想执行一个管道。

You can always use CodePipeline.您始终可以使用 CodePipeline。 see docs: CodePipeline请参阅文档: CodePipeline

CI: CI:

I am using GitHub, so before i can merge a pull request, my code must pass 3 tests.我使用的是 GitHub,所以在我合并拉取请求之前,我的代码必须通过 3 次测试。 Those tests are 3 Codebuilds containers that run tests.这些测试是 3 个运行测试的Codebuilds容器。

CD:光盘:

After my code merged it invoke a CodePipeline that use mainly CodeDeploy and CodeBuild .在我的代码合并后,它调用主要使用CodePipelineCodeDeployCodeBuild

About your goal:关于你的目标:

I'd like to execute a pipeline once a new version of the cloud formation templates is uploaded to Artifactory.一旦将新版本的云形成模板上传到 Artifactory,我想执行一个管道。

I don't really think you need a pipeline for this.我真的不认为你需要一个管道。 Let assume your artifacts uploaded to s3 bucket called artifact-bucket .假设您的工件已上传到名为artifact-bucket的 s3 存储桶。

You can create a CloudWatch rule that will execute StepFunctions state machine when file added to您可以创建一个CloudWatch规则,该规则将在文件添加到时执行StepFunctions state 机器
artifact-bucket . artifact-bucket

see docs: Trigger StepFunctions from S3请参阅文档: 从 S3 触发 StepFunctions

You can easily deploy stack with StepFunctions.您可以使用 StepFunctions 轻松部署堆栈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM