Drupal Continuous Integration

I work at theTeam where I am the sole Drupal developer. Sometimes this is great with a lot of satisfaction knowing that I built an entire site, however with two and a half years experience as of June 2010 I'm not quite where I feel I should be in terms of automation and deploying falling back to code and database deliverables.

At theTeam we are currently a small development team set on not only 'doing things right' but 'doing the right things'. I think I've been doing things right so far. Learning proper coding practices and using Drupal's framework. It's time to do the right things and work with installation profiles, build scripts and testing.

My plan is to start at the beginning and continue to join the parts together as I go.

Installation profiles

First thing to do is to get a simple installation profile working and then get it installing contributed modules.

To do this I basically follow the guide here: http://drupal.org/node/67921 and read the chapter in 'Pro Drupal Development'.

Getting core modules installed is easy, next is how to download and install contributed modules.

Downloading contributed modules

The right thing to me seems that you should be able to install an entire site using only an installation profile, a folder of custom modules and custom themes. So I'm going to create a bash script that makes use of drush to download Drupal and the contributed modules. Now, in an ideal world, there shouldn't be any such thing as custom modules or themes, they should be in Drupal contrib. In a practical world however this isn't possible. So I'll first start with all contrib modules and then look at deploying a package consisting of an installation profile, custom modules and themes.

First off, going from nothing to a Drupal site with contributed modules custom configuration.

Bearing in mind that we're aiming for Continuous integration, I will be creating an Ant script to run each bash script at the right point. You could run them manually without Ant.

Folder structure

To store all the files in the relevant place I will have this structure:
myprojectfolder.com
- build.xml - The ant build script
- scripts - Containing bash scripts
- htdocs - Containing the Drupal build

Post new comment

By submitting this form, you accept the Mollom privacy policy.

User login

Author of...

  • @Casablanca Looks like a great time last night. Sorry I couldn't make it :( 13 years 25 weeks ago
  • Our new homepage is live http://t.co/iwNX1tWZ 13 years 25 weeks ago
  • Can you help with conditionally setting the 'from' in mails sent with notifications/messaging modules #drupal http://t.co/ItE75IlW 13 years 25 weeks ago
  • My post about highjacking #Drupal menu items with 'drupal_get_form' callbacks for creating popups or #ahah goodness http://t.co/Pe9wSz6k 13 years 26 weeks ago
  • Oh the conflict within. An entire section of a #drupal site was built bespoke, do I add a bespoke subsection, or rewrite the entire section? 13 years 29 weeks ago
  • @psd It depends. Serving static pages means https has a larger relative impact. If there's a lot of processing, https is relatively small. 13 years 30 weeks ago
  • Just had a play with the #drupal Field collection module. goo.gl/p6sEn A really nice Drupal 7 implementation of the multigroup module. 13 years 30 weeks ago
  • @philhawksworth @a_alfredo When will scampcat have the descriptions pop up when you hover over the markers? 13 years 30 weeks ago
Oliver Polden