-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathconditional_deploy.html
42 lines (35 loc) · 1.66 KB
/
conditional_deploy.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<h3 id="conditional-deploys">Conditional Deploys</h3>
<p>It is possible to make deployments conditional using the <strong>on</strong> option:</p>
<pre><code>deploy:
provider: {{ include.provider }}
api_key: ...
on:
branch: staging
rvm: 2.0.0
</code></pre>
<p>The above configuration will trigger a deploy if the staging branch is passing on Ruby 2.0.0.</p>
<p>You can also add custom conditions:</p>
<pre><code>deploy:
provider: {{ include.provider }}
api_key: ...
on:
condition: "$CC = gcc"
</code></pre>
<p>Available conditions are:</p>
<ul>
<li><strong>all_branches</strong> - when set to true, trigger deploy from any branch if passing</li>
<li><strong>branch</strong> - branch or list of branches to deploy from if
passing, defaults to master if no branch is specified.</li>
<li><strong>tags</strong> - when set to true, Travis CI only deploys on tagged
builds. Due to a limitation, this condition must be paired with `all_branches`
set to true. Otherwise the default condition for branches will interfere with
the tags condition.</li>
<li><strong>condition</strong> - custom condition or list of custom conditions</li>
<li><strong>jdk</strong> - JDK version to deploy from if passing</li>
<li><strong>node</strong> - NodeJS version to deploy from if passing</li>
<li><strong>perl</strong> - Perl version to deploy from if passing</li>
<li><strong>php</strong> - PHP version to deploy from if passing</li>
<li><strong>python</strong> - Python version to deploy from if passing</li>
<li><strong>ruby</strong> - Ruby version to deploy from if passing</li>
<li><strong>repo</strong> - only trigger a build for the given repository, to play nice with forks</li>
</ul>