2016-07-29 4 views
0

gewünschte Ziel (Pseudo-Code)Travis CI, bereitstellen zu 2 Anwendungen basierend auf Tags

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

Dinge, die ich versucht habe:

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: ... 

dies in travis führt die erste deploy Setup das Ignorieren Test-App

irgendwelche Ideen?

ich weiß, dass ich mein eigenes Skript schreiben, das zu tun, nur fragen, ob es eine saubere „travisy“ Lösung, da dies wie ein ziemlich häufiges Szenario klingt für mich

Antwort

1

es so versuchen:

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

Funktioniert! Danke vielmals :) – goldylucks