这些命令在 buildkite 中意味着什么?
What are these comands mean in buildkite?
这些命令在 buildkit 构建管道中意味着什么?
- 命令:
- 命令:|
- 命令:>-
我正在尝试构建一个构建管道,但我找不到关于它们的任何文档。它们之间有什么区别?
示例:
命令:|
npm 安装
命令:npm 安装
命令:>- npm install
YAML 有多种指定字符串属性的方法:
single-quoted: "a single that can have : and other weird characters"
single-unquoted: another single command (but needs to avoid some special YAML characters, such as ":"
single-split: >
a single
line string
command that's
broken over
multiple-lines
multi-line: |
a
multi-line
string
将其放入 https://yaml-online-parser.appspot.com 您可以看到结果如何:
{
"single-quoted": "a single line command",
"single-unquoted": "another single command (but needs to avoid some special YAML characters, such as \":\"",
"single-split": "a single line string command that's broken over multiple-lines",
"multi-line": "a\nmulti-line\ncommand\n"
}
你也可以在这里找到一些相关的问题:In YAML, how do I break a string over multiple lines?
这里还有一些例子:
https://yaml-multiline.info
这些是 Buildkite 最常见的三种格式 pipeline.yml 命令是这些:
command: "simple-command"
command: |
npm install
npm test
command:
- "npm install"
- "npm test"
(可以交替使用command
和commands
)
对于最后两个示例,列表中的命令将按顺序 运行,并且只要其中任何一个失败,就会失败。即,如果 npm install
命令失败,作业将立即以失败状态结束。
这些命令在 buildkit 构建管道中意味着什么?
- 命令:
- 命令:|
- 命令:>-
我正在尝试构建一个构建管道,但我找不到关于它们的任何文档。它们之间有什么区别?
示例:
命令:| npm 安装
命令:npm 安装
命令:>- npm install
YAML 有多种指定字符串属性的方法:
single-quoted: "a single that can have : and other weird characters"
single-unquoted: another single command (but needs to avoid some special YAML characters, such as ":"
single-split: >
a single
line string
command that's
broken over
multiple-lines
multi-line: |
a
multi-line
string
将其放入 https://yaml-online-parser.appspot.com 您可以看到结果如何:
{
"single-quoted": "a single line command",
"single-unquoted": "another single command (but needs to avoid some special YAML characters, such as \":\"",
"single-split": "a single line string command that's broken over multiple-lines",
"multi-line": "a\nmulti-line\ncommand\n"
}
你也可以在这里找到一些相关的问题:In YAML, how do I break a string over multiple lines?
这里还有一些例子: https://yaml-multiline.info
这些是 Buildkite 最常见的三种格式 pipeline.yml 命令是这些:
command: "simple-command"
command: |
npm install
npm test
command:
- "npm install"
- "npm test"
(可以交替使用command
和commands
)
对于最后两个示例,列表中的命令将按顺序 运行,并且只要其中任何一个失败,就会失败。即,如果 npm install
命令失败,作业将立即以失败状态结束。