Continuous Integration (CI) must be easy, easier to do, than not to. It should reduce the pain of development. However, for many developers and their companies, the idea of running a CI server garners a meek "yeah, I should, but..." or "we did have a CI server running but it died one day and no one fixed it."
In this post I hope to convince you why you absolutely need a full time CI solution for your your team or company.
In a coming post I'll show you how easy it is to run your continuous integration test suite in an environment that matches your production environment. For "Engine Yard AppCloud":http://www.engineyard.com/products/appcloud customers this means you will have a one step solution for setting up and running your applications' CI test suites against AppCloud.
In just two steps that we'll break into two blog articles, you'll have a zero-effort CI solution, one as simple as using Engine Yard AppCloud itself.
I'm going to do this in reverse. You are going to install a CI server and then I'll discuss which one you ought to choose. I know it's weird, but trust me.
Take nine minutes to watch a quick demo of Jenkins CI. The short demo will walk you through the two steps to get it hosted on Engine Yard AppCloud, and how to setup Post-Commit hooks from "GitHub":https://github.com
Hosted CI on Engine Yard AppCloud
Follow these three steps to get setup with a hosted CI server. A summary video is included too.
- "Create":https://login.engineyard.com/signup an Engine Yard AppCloud account.
- Using the Quick Start wizard, create an application for @git://github.com/engineyard/Jenkins_server.git@ with default settings, and boot a single instance.
On your local computer:
gem install engineyard-jenkins ey-jenkins install_server
When this is complete, you've got yourself a running CI server.
Take 2 - Which CI?
I highly recommend using the "Jenkins CI":http://jenkins-ci.org/ as your CI server. Why Jenkins? One simple reason. As demonstrated, it is very easy to set up. If you have Java installed on your local machine, you can also launch it by "clicking here":https://jenkins.dev.java.net/jenkins.jnlp.
Or you can set up a Ruby-flavored Jenkins server using the "Jenkins.rb":https://github.com/cowboyd/jenkins.rb project:
gem install jenkins jenkins server open http://localhost:3001
It can be completely configured via its Web UI (see Manage Jenkins on the sidebar), and also from a CLI (the "Jenkins.rb":https://github.com/cowboyd/jenkins.rb project). To add an OSS Ruby project into Jenkins and automatically begin running its test suites:
git clone git://github.com/engineyard/engineyard-jenkins.git cd engineyard-jenkins jenkins create . --type ruby # or jenkins create . --type ruby --scm git://github.com/engineyard/engineyard-jenkins.git
Use @jenkins help create@ to see the list of options for the @create@ task.
Jenkins CI is a rock solid, open source CI server. It is widely used by many developer communities and is quickly gaining wider adoption within the Ruby/Rails community.
One of the champion features I love about Jenkins CI is that it can be configured to run test suites on alternate target computers. That is, Jenkins can run the unit and integrate my Rails application tests within an Engine Yard AppCloud environment - exactly the same environment as my production application.
This means ZERO setup time for configuring my CI system. A new project can have its tests executed by your CI system within minutes of creating a new Rails application. I want that.
Running CI Test Suites on AppCloud
Stay tuned. Coming soon. The core functionality is working. There is a bit of clean up to make the "getting started" experience ultra-simple. To stay on top of announcements, you can check out our "Engine Yard Ruby on Rails blog":http://www.engineyard.com/blog/, the "@engineyard Twitter account":http://twitter.com/engineyard, our monthly "Engine Yard Newsletter":http://www.engineyard.com/newsletter, or our new "Cloud Out Loud podcast series":http://www.engineyard.com/podcasts.
"Is my Jenkins CI supported by Engine Yard?"
Currently Engine Yard is not offering any Support for Jenkins CI. If you have issues with these instructions, please use the "Issues tracker":https://github.com/engineyard/engineyard-jenkins/issues for the @engineyard-jenkins@ project. For issues with the @jenkins@ CLI tool use the "Jenkins.rb issue tracker":https://github.com/cowboyd/jenkins.rb/issues.
Jenkins is Ugly. Please Help.
Some people with very attuned aesthetic senses might argue that the Jenkins CI dashboard isn't 100% good looking. If you are a designer who uses Jenkins CI, and have some ideas about how to fix the Jenkins UX predicament, and how to improve the look'n'feel, please "email me":mailto:email@example.com. Together, with your help, we can help everyone have a better CI experience.jenkins