Drupal Features and Drush: updating our development workflow

I’m working with two other people on a Drupal project, so we’re coordinating our work through a Subversion source code repository. A lot has changed in Drupal since the days when I dived into the source code to figure out the code I needed in order to duplicate the configuration changes I made through the web interface (Drupal staging and deployment: it’s all code). Now, the Features module can export various configuration bits as a module that you can check into your source tree and enable on your site. It will even show you which settings you’ve overridden through the web interface, so you can regenerate the code and make sure everything’s included.

Drush (the Drupal shell) has some commands that make Drupal features even easier to use. For example, I use drush features-diff <feature_name> to see which settings I’ve changed, and drush features-update to re-export the settings to source code.

Because we’ll be using Features to share our changes instead of working off SQL backups, I need to make sure that I’ve included all the relevant components in the features I create. One way to test that is to use Backup and Migrate to save my configured database (just in case!), load a previous backup, enable the feature, and confirm that everything works as expected.

Tests using either SimpleTest or Selenium would be the best way to confirm everything is working, of course. When Stuart comes back on Monday, he can help us set up an environment using hudson as a continuous integration server. Stuart has set up Selenium tests before, and it might be possible to use simpletest with hudson also.

  • http://treehouseagency.com/ Steven Merrill

    It is definitely possible to use Hudson with SimpleTest. Pressflow 6 has a slightly updated version of Steven Jones’s run-tests.sh script that can output XML. (See http://bazaar.launchpad.net/~pressflow/pressflow/6/revision/59 .)

    We’re trying to get it into Drupal 7 core, as well: http://drupal.org/node/602332 .

  • http://www.coderintherye.com Kevin

    You may also want to consider luntbuild or quickbuild in addition to Hudson. We use it for our continuous integration in conjunction with Drush, Phing, and SVN. Quickbuild is a proprietary version of luntbuild which is available free to open source projects. We love it.