2016-07-29 5 views
0

望ましい目標(擬似コード)私が試したトラヴィスCI、タグに基づいて2つのアプリケーション

if (tag) { deploy to live-app} 
else { deploy to test-app} 

物事への展開:これは、第1〜第デプロイの設定を無視してトラヴィスになり

deploy: 
    provider: heroku 
    app: live-app 
    api_key: 
    secure: ... 

deploy: 
    provider: heroku 
    app: test-app 
    on: 
    tags: true 
    all_branches: true # needed due to travis limitation, we deploy only on master 
    api_key: 
    secure: ... 

テストアプリ。

は私が

答えて

1

はこのようにそれを試してみて、これはかなり一般的なシナリオのように私に聞こえるので、私はクリーナー「travisy」解決策があるかどう思っ、それを行うために自分のスクリプトを書くことができます知っている:

deploy: 
    - provider: heroku 
     app: live-app 
     api_key: 
     secure: ... 
     on: 
     tags: false 

    - provider: heroku 
     app: test-app 
     on: 
     tags: true 
     all_branches: true # needed due to travis limitation, we deploy only on master 
     api_key: 
     secure: ... 
+0

作品!どうもありがとう :) – goldylucks

関連する問題