在 Drone 0.5 中,是否可以仅将矩阵应用于某些流水线步骤?

In Drone 0.5, is it possible to apply a matrix to only certain pipeline steps?

我的 drone.yml 中有一个 matrix,但它只应该 运行 在我的一个管道步骤中。是否可以仅将矩阵应用于某些步骤?

例如,我不希望矩阵应用于 publish 步骤:

pipeline:
  test:
    image: ruby
    commands:
      - bundle exec rspec ${TESTFOLDER}
  publish:
    image: ruby
    commands:
      - magic-publish

matrix:
  TESTFOLDER:
    - integration/user
    - integration/shopping_cart
    - integration/payments
    - units

如果您只想 "magic-publish" 一次,您可能希望将其限制为矩阵的单个元素(也许是最后一个):

when:
  matrix:
    TESTFOLDER: units

您还可以将部署步骤附加到 tagdeploy 事件。

比照。 How to setup conditional build steps