Friday, March 30, 2012

Getting Drupal updates into TEST


.

  1. I create a branch from TEST and call it something like updates. (git checkout -b updates)
    1. Now I'm working in the branch updates
  2. Create a backup of the database - important and discussed later.
  3. Pull the necessary modules or Drupal updates and test it out.
  4. Everything look ok?  Then merge the branch to TEST.  
    1. git checkout test
    2. git merge updates
    3. handle any conflicts
Why would you do this rather than pull your Drupal updates right into TEST? Murphy's Law.  If you pull the Drupal updates into TEST first, then somebody is bound to have an issue or item that needs worked on that needs to go into TEST before you had a chance to completely test and verify your Drupal upgrade.  

The approach above helps you get around this.  You're in the middle of testing Drupal updates and someone approaches you with a bug or change that needs to go into TEST first. How do you roll back to the TEST branch? 
  1. checkout TEST (git checkout test)
  2. Restore the database using the backup you created earlier.
  3. You are now at the TEST version you need for the new change, without those Drupal updates that you haven't completely tested.
  4. Create your new bug/change branch and continue on the issue that was asked of you.