这是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我不想给出另一个buildspec(build2.yml),而是直接在一个文件中指定命令。
发布于 2022-03-22 20:07:09
您可以使用内联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发布于 2022-09-27 02:38:49
buildspec是batch/build-list的一个可选属性,来自AWS文件
如果未指定此参数,则使用当前buildspec文件。
因此,您可以向buildspec添加阶段,就像对非批处理构建( 用户指南中的示例 )一样。
batch:
build-list:
- identifier: build1
env:
compute-type: BUILD_GENERAL1_SMALL
- identifier: build2
env:
compute-type: BUILD_GENERAL1_MEDIUM
phases:
build:
commands:
- echo 'file' > output_file
artifacts:
files:
- output_filehttps://stackoverflow.com/questions/68469081
复制相似问题