Travis + Matrix部署到多个aws存储桶

时间:2018-04-18 20:01:29

标签: matrix amazon-s3 travis-ci

我想知道如何通过双重部署设置矩阵。

这里是逻辑

language: node_js
node_js:
  - 8
cache:
  yarn: true
matrix:
  include:
    - env: MHTD=USER1
    - env: MHTD=USER2
install:
  - if [ "$MHTD" = "USER1" ]; then yarn build-web:"$BUILD_NAME"; fi
  - if [ "$MHTD" = "USER2" ]; then yarn build-web:"$BUILD_NAME1"; fi

所以现在我有一个逻辑,但我不知道如何设置部署步骤。我想将两个不同的构建推送到2个不同的s3桶。我怎么能这样做?

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

每个构建阶段的矩阵扩展目前是travis-ci的开放feature request。解决方法是手动指定具有不同输入的多个阶段,例如来自this example

cache: bundler

jobs:
  include:
    - stage: prepare cache
      script: true
      rvm: 2.3
    - stage: test
      script: bundle show
      rvm: 2.3
    - stage: test
      script: bundle show
      rvm: 2.3
相关问题