Didn’t blog for long time, mainly due to I am learning to many new things
, let’s start the CI part.
In short http://www.travis-ci.org gives me the new thinking of CI, and I think it is the evoluation as well, originally I think CloudBee (jenkins behind it) http://www.cloudbees.com/ is great to put development into cloud. But that is just next normal step, not evolution (at least in CI part).
Let’s see how traditional CI works
Normal CI server like Jenkins
Everytime we talk about CI, we will have 2 steps in mind
- prepare the CI server with needed 3pp installed.
- CMer will create the job for related tasks towards code repository
Looks good and smoothly, and we are used to it.
It had some limitations
Multi platform or package dependance
It will be quite trickly if you want your software to be built and verified in different OS, mostly we need prepare the same machines, if you are good at jenkins, then master/slave mode is used.
Then go further for multi 3pp and different dependance, then this make environment preparation is very hard, since the matrix will be large.
You may think about cross compiler, one solution for building.
Surely as I demoed before, you can use vagrant/virtualbox inside jenkins server, yes, it is good, just not elegant
Jobs are managed by CMer
It is named jobs to each build task, and since it is central, mostly only CMer had permission to create jobs and let CI server run for you, it covers mainly on master/main branch. Since server is limited, running CI for your private branch is expensive on adminstrative.
And who understand best on building and testing environment ? It should be developers, so why not let developers to configure what they want and build for it ?
Awesome Travis-CI
So what it is really needed for good CI ?
As a developer, I can write down which os/environment that build is needed, just like right, I need several extra packages and two ruby platform on Ubuntu OS. Also I know how to execute the build.
That’s good enough for a build, so CI will do the rest all, this is what http://travis-ci.org ‘s job
- After I put this configuration besides source codes and push to github
- travis-ci load virtual machine from pool via vagrant/virtualbox, currently it supports Ubuntu 11.04 only
- travis-ci apply your configuration into virtual machine using chef
- travis-ci run you job, and give report, see example: http://travis-ci.org/#!/larrycai/sdcamp
- travis-ci distroy the vm and put back into pool
That’s all the CI should do and this is exactly I want !
What’s the benefit
No CMer is involved, not only time is saved, but also I don’t need to spend time to communicate with them on which kind of environment (package), because it is my business, not their focus.
I can trigger build as much as possible with full control, and since the build normally last shorted, other developers will reuse the machine after my time slot, Even they use total different platform.
Summary
I don’t want to say jenkins is bad, actually it is quite powerful and flexibility. I just want to indicate travis-ci understand better for the future of the build
Go there, try it and even fork it to run by yourself.
I love opensource, innovation comes from competition! Well done both to jenkins and travis-ci.
And I want to name this is “CI on deman” or “Private CI”.