这是 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/