在AWS CICD代码管道中使用bash脚本

发布于 2025-01-30 03:51:29 字数 179 浏览 5 评论 0原文

在我的公司中,我们必须将AWS本机用于CICD流程。我用来通过BASH脚本部署服务,这使部署非常灵活。但是,我似乎找不到AWS Codepipeline中的选项,可以在其中打电话给脚本。在构建阶段,我可以在buildspec.yml文件上调用,但是在部署阶段,我希望能够使用bash脚本。有人知道使用AWS Codepipeline是否可以吗?

In my company we have to use AWS native for the CICD process. I'm used to deploying my services via a bash script which makes deployments very flexible. However, I can't seem to find an option in AWS CodePipeline in which I can call on a script. In the build phase I am able to call on a buildspec.yml file, but in the deploy phase I would like to be able to call on a bash script. Does anyone know if that's possible using AWS CodePipeline?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痞味浪人 2025-02-06 03:51:29

这就是我在deployspec.yml中使用的内容,以使其使用bash脚本来调用:

version: 0.2
env:
  shell: bash
phases:
  install:
    runtime-versions:
      python: 3.8
    commands:
    - source deployspec.sh && create-stack-name && upload-to-s3 && create-cf-stack

This is what I put in the deployspec.yml to make it call on a bash script:

version: 0.2
env:
  shell: bash
phases:
  install:
    runtime-versions:
      python: 3.8
    commands:
    - source deployspec.sh && create-stack-name && upload-to-s3 && create-cf-stack
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文