Skip to content

Commit db463fd

Browse files
committed
biicode deploy docs
1 parent fa34dc8 commit db463fd

File tree

5 files changed

+152
-14
lines changed

5 files changed

+152
-14
lines changed

_layouts/en.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>Travis CI: {{ page.title }}</title>
66
<link rel="stylesheet" type="text/css" href="/style.css" media="screen">
77
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,800' rel='stylesheet' type='text/css'>
8-
<link rel="alternate" type="application/rss+xml" title="Travis CI Build Environment Updates" href="http://docs.travis-ci.com/feed.build-env-updates.xml">
98
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
109
<script src="/site.js" type="text/javascript" charset="utf-8"></script>
1110
<link rel="alternate" type="application/atom+xml" href="/blog.xml">
@@ -101,7 +100,6 @@ <h2>Reference</h2>
101100
<li><a href="/user/multi-os/">Building on Multiple Operating Systems</a></li>
102101
<li><a href="/user/uploading-artifacts/">Uploading Build Artifacts</a></li>
103102
<li><a href="/user/ssh-known-hosts/">Adding to SSH Known Hosts</a></li>
104-
<li><a href="/user/build-environment-updates">Build Environment Updates (December 2014 and later)</a></li>
105103
</ul>
106104

107105
<h2>Travis Pro</h2>
@@ -132,33 +130,27 @@ <h2>Language-specific Guides</h2>
132130
<li><a href="/user/languages/c/">C</a></li>
133131
<li><a href="/user/languages/cpp/">C++</a></li>
134132
<li><a href="/user/languages/clojure/">Clojure</a></li>
135-
<li><a href="/user/languages/csharp/">C#</a></li>
136-
<li><a href="/user/languages/d/">D</a></li>
137133
<li><a href="/user/languages/erlang/">Erlang</a></li>
138-
<li><a href="/user/languages/csharp/">F#</a></li>
139134
<li><a href="/user/languages/go/">Go</a></li>
140135
<li><a href="/user/languages/groovy/">Groovy</a></li>
141136
<li><a href="/user/languages/haskell/">Haskell</a></li>
142137
<li><a href="/user/languages/java/">Java</a></li>
143138
<li><a href="/user/languages/javascript-with-nodejs/">JavaScript (with Node.js)</a></li>
144-
<li><a href="/user/languages/julia/">Julia</a></li>
145139
<li><a href="/user/languages/objective-c/">Objective-C</a></li>
146140
<li><a href="/user/languages/perl/">Perl</a></li>
147141
<li><a href="/user/languages/php/">PHP</a></li>
148142
<li><a href="/user/languages/python/">Python</a></li>
149143
<li><a href="/user/languages/ruby/">Ruby</a></li>
150-
<li><a href="/user/languages/rust/">Rust</a></li>
151144
<li><a href="/user/languages/scala/">Scala</a></li>
152-
<li><a href="/user/languages/csharp/">Visual Basic</a></li>
153145
</ul>
154146

155147
<h2>Deployment</h2>
156148
<ul>
157149
<li><a href="/user/deployment/">Overview</a></li>
158150
<li><a href="/user/deployment/appfog/">Appfog</a></li>
151+
<li><a href="/user/deployment/biicode/">biicode</a></li>
159152
<li><a href="/user/deployment/cloud66/">Cloud 66</a></li>
160153
<li><a href="/user/deployment/heroku/">Heroku</a></li>
161-
<li><a href="/user/deployment/codedeploy/">AWS CodeDeploy</a></li>
162154
<li><a href="/user/deployment/modulus/">Modulus</a></li>
163155
<li><a href="/user/deployment/nodejitsu/">Nodejitsu</a></li>
164156
<li><a href="/user/deployment/engineyard/">Engine Yard</a></li>

user/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ permalink: deployment/
99
Continuous Deployment to the following providers are currently supported out of the box:
1010

1111
* [Appfog](/user/deployment/appfog)
12+
* [biicode](/user/deployment/biicode)
1213
* [Cloud 66](/user/deployment/cloud66)
1314
* [Heroku](/user/deployment/heroku)
14-
* [AWS CodeDeploy](/user/deployment/codedeploy)
1515
* [Modulus](/user/deployment/modulus)
1616
* [Nodejitsu](/user/deployment/nodejitsu)
1717
* [OpenShift](/user/deployment/openshift)

user/deployment/biicode.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: biicode deployment
3+
layout: en
4+
permalink: biicode/
5+
---
6+
7+
Travis CI can automatically publish your [biicode](https://www.biicode.com) blocks after a successful deploy.
8+
9+
For a minimal configuration, all you need to do is add the following to you `.travis.yml`:
10+
11+
{% highlight yaml %}
12+
deploy:
13+
provider: biicode
14+
user: "YOUR_USER"
15+
password: "YOUR_PASSWORD" # should be encrypted
16+
{% endhighlight %}
17+
18+
Install Travis CI command line client to encrypt your password like this:
19+
20+
{% highlight console %}
21+
$ travis encrypt "YOUR PASSWORD" --add deploy.password
22+
{% endhighlight %}
23+
24+
You can also have the `travis` tool set everything up for you:
25+
26+
{% highlight console %}
27+
$ travis setup biicode
28+
{% endhighlight %}
29+
30+
Keep in mind that the setup command has to run in your project directory, so it can modify the `.travis.yml` for you.
31+
32+
### Branch to deploy from
33+
34+
You can also explicitly specify the branch to deploy from with the **on** option:
35+
36+
{% highlight yaml %}
37+
deploy:
38+
provider: biicode
39+
user: ...
40+
password: ...
41+
on: production
42+
{% endhighlight %}
43+
44+
Alternatively, you can also configure Travis CI to deploy from all branches:
45+
46+
{% highlight yaml %}
47+
deploy:
48+
provider: biicode
49+
user: ...
50+
password: ...
51+
on:
52+
all_branches: true
53+
{% endhighlight %}
54+
55+
Builds triggered from Pull Requests will never trigger a deploy.
56+
57+
### Deploying build artifacts
58+
59+
After your tests ran and before the deploy, Travis CI will clean up any additional files and changes you made.
60+
61+
Maybe that is not what you want, as you might generate some artifacts that are supposed to be deployed too (like dependencies' data). There is now an option to skip the clean up:
62+
63+
{% highlight yaml %}
64+
deploy:
65+
provider: biicode
66+
user: ...
67+
password: ...
68+
skip_cleanup: true
69+
{% endhighlight %}
70+
71+
### Conditional Deploys
72+
73+
You can run deploy only when certain conditions are met.
74+
See [Conditional Releases with `on:`](/user/deployment#Conditional-Releases-with-on%3A).
75+
76+
### Running commands before and after deploy
77+
78+
You can use the `before_deploy` and `after_deploy` stages to run commands just before and after the deploy is done. These will only be triggered if Travis CI is actually deploying.
79+
80+
{% highlight yaml %}
81+
before_deploy: "echo 'ready to publish?'"
82+
deploy:
83+
..
84+
after_deploy:
85+
- bii deps --detail
86+
{% endhighlight %}
87+
88+
### Using biicode in your deploy
89+
90+
Add this to your `install:` entry to install biicode in your build machine:
91+
92+
{% highlight yaml %}
93+
install:
94+
- wget http://apt.biicode.com/install.sh && chmod +x install.sh && ./install.sh
95+
- bii setup:cpp
96+
{% endhighlight %}
97+
98+
This downloads a script to install biicode on Debian-based distros, as explained in [biicode docs](http://docs.biicode.com/c++/installation.html#alternative-install-debian) and executes a biicode command to set up required tools for C/C++ development. It actually installs CMake.
99+
100+
Now you're ready to use biicode in the build virtual machine. All biicode commands are available. Note: build changes made before performing the deploy are discarded except disabled with the `skip_cleanup` flag (See *"Deploying build artifacts"*).
101+
102+
It's a good practice to check biicode's version after installing:
103+
104+
{% highlight yaml %}
105+
install
106+
...
107+
- bii --version
108+
{% endhighlight %}
109+
110+
111+
### A simple biicode deployment example step by step
112+
113+
Let's say you have a C++ math library called *CppMath*. It's hosted in github and you are running some unit tests via Travis CI.
114+
Deploy your CppMath library to biicode, a C and C++ dependency manager, make it available for everybody to use via an `#include`!
115+
116+
Use Travis CI with biicode to automatize* the process:
117+
118+
- Run some unit tests on the library
119+
- Use `bii publish` command to deploy to biicode.
120+
121+
Here's [CppMath example code](https://github.com/Manu343726/CppMath/), it's structured as a `manu343726/cppmath` biicode block. *manu343726 is the biicode developer who wrote the example, hence that user instead of `developer`.*
122+
123+
Supposing your biicode account is `developer`, create a `.travis.yml` file to automatize deploy and publish like this:
124+
125+
{% highlight yaml %}
126+
install:
127+
- wget http://apt.biicode.com/install.sh && chmod +x install.sh && ./install.sh #Install biicode
128+
- bii setup:cpp #Install biicode required C/C++ tools (GCC, cmake, etc)
129+
script:
130+
- bii find --update #Find biicode dependencies
131+
- bii cpp:configure #Configure block for building
132+
- bii cpp:build #Build block
133+
- ./bin/developer_cppmath_tests --reporter=info #Run tests
134+
deploy:
135+
provider: biicode
136+
user: developer
137+
password: #password
138+
secure: encrypted password here
139+
on:
140+
repo: developer/cppmath #GitHub repo
141+
{% endhighlight %}
142+
143+
Script part creates, builds and runs the project and if it's a success Travis CI executes deploy publishing the `developer/cppmath` block.
144+
145+
>**Tip**
146+
>biicode generates an executable `user_blockname_sourcefilename` for each source file with a `main()` function. In the example it would be `developer_cppmath_tests`.

user/languages/c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ C projects on travis-ci.org assume you use Autotools and Make by default.
2121

2222
## Dependency Management
2323

24-
Because there is no dominant convention in the community about dependency management, Travis CI skips dependency installation
25-
for C projects.
24+
There is no dominant convention in the community about dependency management, but there are some dependency management tools available.
25+
Travis CI has support for [biicode](https://www.biicode.com/), a C and C++ dependency manager. Check [how to deploy with biicode](http://docs.travis-ci.com/user/deployment/biicode/).
2626

2727
If you need to perform special tasks before your tests can run, override the `install:` key in your `.travis.yml`:
2828

user/languages/cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ C++ projects on travis-ci.org assume you use Autotools and Make by default.
2121

2222
## Dependency Management
2323

24-
Because there is no dominant convention in the community about dependency management, Travis CI skips dependency installation
25-
for C++ projects.
24+
There is no dominant convention in the community about dependency management, but there are some dependency management tools available.
25+
Travis CI has support for [biicode](https://www.biicode.com/), a C and C++ dependency manager. Check [how to deploy with biicode](http://docs.travis-ci.com/user/deployment/biicode/).
2626

2727
If you need to perform special tasks before your tests can run, override the `install:` key in your `.travis.yml`:
2828

0 commit comments

Comments
 (0)