I hear the buzz words, "continuous integration", "drush" and "jenkins" often. Thus, sparking my interest.
How are drush and jenkins used together for continuous integration?
Also, why would you want to use drush and jenkins together?
For my projects, I use a build script made of Drush commands in a Jenkins job. I use my Phing Drush Task project to run Drush from a Phing build script. This allow me to leverage the existing Phing tasks (eg. files copy, phplint, etc.). With the help of Drush, this build script
./dist
settings.php
(ie. replace ${db_host}
with the actual DB hostname) while copying it to the freshly downloaded ./dist/sites/default
folder../dist/sites/all/modules/custom
and ./dist/sites/all/themes/custom
phplint
for all files from my custom modules and themes../dist
to a pre-configured webroot.drush site-install testing
and drush pm-enable simpletest
to install a fresh site using the build code base and able to run SimpleTest.drush test-run
to run my custom module test suites.drush coder-review
.Here is a commented build.xml template for Drush usage in Jenkins.
You can use Phing in Jenkins, so you can use Drush through http://drupal.org/project/phingdrushtask (Pierre Buyle on SE.COM)
Custom example:
<drush command='cc' root="${project.drupal.core.dir}" uri="${env.host.name}" assume="yes">
<param>all</param>
</drush>