amazon-web-services - 使用单个构建规范文件在 CodeBuild 中运行批量构建

标签 amazon-web-services aws-codebuild

这是 CodeBuild 中构建列表的构建规范格式

version: 0.2

batch:
  fast-fail: false
  build-list:
    - identifier: build1
      env:
        variables:
          BUILD_ID: build1
      ignore-failure: false
    - identifier: build2
      buildspec: build2.yml
      env:
        variables:
          BUILD_ID: build2
      ignore-failure: true

我想直接在单个文件中指定命令,而不是提供另一个构建规范(build2.yml)。

最佳答案

您可以使用内联 yaml 语法而不是传递文件名。 像这样的事情:

version: 0.2
batch:
  fast-fail: false
  build-list:
    - identifier: build1
      env:
        variables:
          BUILD_ID: build1
      buildspec: |
        version: 0.2
        env:
          shell: bash
        phases:
          build:
            commands:
              - command
      ignore-failure: true

    - identifier: build2
      env:
        variables:
          BUILD_ID: build2
      buildspec: |
        version: 0.2
        env:
          shell: bash
        phases:
          build:
            commands:
              - command
      ignore-failure: true

关于amazon-web-services - 使用单个构建规范文件在 CodeBuild 中运行批量构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68469081/

相关文章:

linux - 有人在 Raspberry pi 3(ARM) 上正确安装了 aws-cli v2(x86_64; zipped) 吗?

amazon-web-services - Kubernetes 中的真正负载平衡?

amazon-web-services - AWS 代码构建 | docker |无法拉取客户的容器镜像 |基于 Windows 版本 10.0.17763 的镜像与 10.0.14393 主机不兼容

amazon-web-services - AWS CodeBuild GitHub 部署 key

c# - 代码构建工件未正确打包

amazon-web-services - 亚马逊登录后如何获取 "address consent token"?

amazon-web-services - AWS Athena : use "folder" name as partition

sql - 如何在 AWS Athena 中编写多个 SQL 语句,如 CREATE 表(使用 CLI 命令 - aws athena start-query-execution --query-string {value} )?

amazon-web-services - 如何在代码构建中将命令的输出分配给变量

amazon-web-services - 如何使用 CloudFormation 中的 CodeBuild 指定 GitHub 访问 token