1

BuildKite 文档建议您可以添加将应用于整个 pipeline.yml文件的环境变量,但实际上并未向您展示如何执行此操作。

我试过类似的东西:

CONCURRENCY=10

steps:

  - label: ":rocket: Let's kick this pig"
    concurrency: $CONCURRENCY

  - label: ":explosion: All out of bubble-gum"
    concurrency: $CONCURRENCY

但是我遇到了语法错误。

4

1 回答 1

2

您在env块中指定它们,类似于为步骤指定环境变量。

env:
   CONCURRENCY: 10

steps:

  - label: ":rocket: Let's kick this pig"
    concurrency: $CONCURRENCY

  - label: ":explosion: All out of bubble-gum"
    concurrency: $CONCURRENCY

这是有道理的,一路低吟。

于 2019-03-06T22:52:07.740 回答