Monday, July 14, 2014

Jenkins Job DSL Plugin

Jenkins has a ton of plugins available to it, some of which are more well known than others. One particular one that I've recently found to be very useful is the Job DSL Plugin. It allows you to use a groovy DSL to script the creation of your Jenkins jobs. This is beneficial because it makes your jobs recreatable and avoids the pattern where you create a bunch of similar jobs and then they slowly diverge. It also allows you to easily rebuild the jobs in the event of data loss.

As an industry we're getting better at automating the creation of our deployment environments with tools like docker, puppet, ansible and chef, but tools such as the DSL plugin allow for a nice way to automate the creation of your Jenkins jobs. For actually configuring your build environment using docker and ansible, check out this post http://blog.sequenceiq.com/blog/2014/05/09/building-the-build-environment-with-ansible-and-docker/ by the team at SequenceIQ.