When I started developing on my DiveLog Side Project, one of the goals of the project was to experiment with various development tools that help with things like code quality, metrics, etc. I initially was going to setup my own Build Box ans run Sonar, but I ultimately decided against it. While in the process of looking in to all of the CI systems that are out there, I stumbled upon a free Hosted CI Solution called Travis-CI.

Travis-CI is a 100% Free and remotley hosted CI system for open source projects. It connects to your projects GitHub repository via hooks, and whenever a push is made, it will automatically run a build. The CI Environment it self comes equipped with everything you need to build your code, regardless if the language it is in. It supports a large variety of languages, several databases, has multiple messaging servers, and even supports headless browser testing. The one thing it does not have is a Java Application Server, however this can easily be remedied by using Maven to Download and Unpack JBoss AS7.

Setting up Travis-CI

Setting up Travis-CI is as simple as placing a configuration file into the root of your project and configuring a hook in GitHub, and Travis-CI can actually configure that hook for you. The configuration file for your project can be anywhere from a single line, to dozens of lines, depending on how complex you need your build process to be. This file is where you setup the build environment and specify things like what JDK you need, what Database you want, etc... You can also configure build reporting options so that Travis-CI will notify you when your build is complete. The file is extremely simple to write, and they even provide an online validator that you can use to verify your configuration file is properly formatted.

Running your Build

Running your build on Travis-CI is as simple as pushing a change to your GitHub repository. Once the push is made Travis-CI will grab your latest code and kick off the build process that you configured for your project. You can then go to the Travis-CI website to the view the progress/results of your builds.

Final Thoughts

If you are developing an Open Source project that is hosted on GitHub and you need a Free and remotely hosted CI solution, Travis-CI is the only way to go.

References



Published

25 September 2012

Tags