从CloudFormation堆栈中删除CodePipeline更新

发布于 2025-02-04 12:20:38 字数 585 浏览 4 评论 0原文

我目前正在使用CDK合成器来生成我使用SAM部署命令部署的模板。

我的工作背后的想法是在不使用Codepipeline的情况下从GitLab Runner部署堆栈(这是实际部署方法)。

我设法在CDK Synth命令之后使用位于CDK.OUT中的模板部署堆栈。但是,部署是触发codepipeline的,因为该模板包含“ ” type“:aws :: codepipeline :: pipeline”部分,该部分会导致“ *修改cdkpipeline aws :: codepipipeline :: codepipeline :: Pipeline在堆栈的SAM部署命令中,

我想在部署部分中删除此操作,以免触发CodePipeline。 我无法修改自己的代码,因为我需要保持两种部署方法。 我也无法使用SAM Deploy命令的引导提示,因为脚本是从GitLab Runner执行的。

您是否有任何线索可以通过在部署上传递参数(如果有效的话,其他库对我来说还好),或者使用删除模板中codepipeline部分的工具?也许存在一些同样的东西,以防止CDK合成器生成代码序列部分?

我愿意接受任何建议。

谢谢你

I'm currently using CDK Synth in order to generate templates that I deploy with a sam deploy command.

The idea behind my work is to deploy my stacks from a GitLab runner, without the use of CodePipeline (which is the actual method of deployement).

I manage to deploy my stack as I want using the template located in the cdk.out, after the CDK Synth command. However, the deploy is triggering the CodePipeline because the template contains a ""Type": AWS::CodePipeline::Pipeline" section, which leads to a " * Modify cdkpipeline AWS::CodePipeline::Pipeline operation in the sam deploy command of the stack.

I want to remove this operation in the deploy section, so that the CodePipeline is not triggered.
I can't modify the code in himself, because I need to keep both deployment methods alive.
I also can't use the --guided prompts from the sam deploy command because the scripts are executed from a GitLab runner.

Do you have any clue on achieving this, by passing parameters on the deploy (other libraries are fine to me if it works), or by using a tool that deletes the CodePipeline section in the templates ? Maybe something exists aswell to prevent CDK Synth to generate a CodePipeline section ?

I'm open to any proposal.

Thank you already

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文