Last night at the Seattle CFUG meeting, Matt Woodward and Nick Harvey introduced us to Jenkins. Jenkins is what's called a continuous integration application. Here's an overview of how it works:
When I'm working on a web application I generally make the changes on my local development machine and then simply FTP the changed file to the production server. That's cool as long as the changes I made don't break something else on the production server (not that I would ever write bad code). As you know this will probably work fine for a very small application, but as I've grown as a programmer I've started trying to employ some best practices in development such as version control and unit testing. It adds an extra couple steps to my workflow, but I've found that doing so improves my code's reliability greatly. This is where Jenkins comes in. Essentially Jenkins eliminates the need for you to do the unit testing and pushing of code manually. It checks your repository (SVN, Git, whatever) for new code at intervals you specify, runs any unit tests you've created on that code, and automatically FTPs (or SSH if you're a Mac) it to another server (test, staging, production or whatever). All you have to do is push code to your repository and Jenkins handles the rest. How cool!
I like the fact that Jenkins has all kinds of plugins that help you make it work the way you want to work too, and so in this post I'm simply going to share the resources I've downloaded for my environment, and I'll write more posts as I continue to integrate Jenkins into my workflow. Jenkins also uses ANT, which I've never used before, which is how you tell jenkins what it needs to do.
My development environment is a Dell laptop running Windows Vista (new machine coming soon). I use Git for my version control, and although my projects are private at BitBucket (per client requirements) I'm going to create a sample repository at GitHub so folks can follow me through this. I also use MXUnit for unit testing. My production machine is a Windows 2008 server with MSSQL and ColdFusion 9.01.
These are the downloads specific to my envionment:
- Jenkins (native Windows installer) http://mirrors.jenkins-ci.org/windows/latest
- Jenkins plugin for Git https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
- Jenkins plugin for ANT https://wiki.jenkins-ci.org/display/JENKINS/Ant+Plugin
- Jenkins home page http://jenkins-ci.org
- Jenkins at Github https://github.com/jenkinsci
- Mike Henke's blog on moving assets from Jenkins to ColdFusion using ANT http://www.henke.ws/post.cfm/moving-assets-from-jenkins-to-a-coldfusion-server-with-ant
- Matt Woodward's blog post on deploying ColdFusion applications as WAR files using ANT http://blog.mattwoodward.com/2012/04/setting-up-jenkins-to-deploy-cfml.html
- MXUnit post on running unit testing with Jenkins http://wiki.mxunit.org/display/default/Continuous+Integration+--+Running+tests+with+Jenkins
- Matt Woodward's presentation on Jenkins from the Seattle CFUG meeting on July 12, 2012 https://docs.google.com/presentation/d/1ywIMAHR42ETqkzHAK1FJJa_c6uwLWtytRx8TBD9oi_4/edit#slide=id.p