Continuous Deployment for Drupal 7 (part 2)


Hi again! If you haven’t read the first part of this article, then you might want to give a look at Continuous Deployment for Drupal 7 (part 1) before moving onto this one.

If you already read it, then great! Let’s continue then.

At this point you know that to implement your continuous deployment workflow for your Drupal project you have to:

  1. Do everything in code (the most you have in code, the less you’ll have to do manually using the Drupal admin interface).
  2. Use the hook_update_N for Drupal (and create a custom module for it, you’ll keep your things more organized).
  3. Install and use Drush, so you can use the Shell (console, terminal, you name it according to your OS) to run commands.

Now, we have everything in place, we just have to create a pipeline (or workflow, use the name that best fits for you) to complete the process.

  1. Add your changes to the code.
  2. Push to the develop branch (as an example, you can set a pipeline for every branch you need).
  3. Automatically send the changes to the development environment.
  4. Pull the changes
  5. Create a database backup
  6. Run the pending database updates (yes, your code inside the hook_update_N will be executed at this point)
  7. Clear the cache

Easy! now, how can we do this? There are plenty of options, like Github webhooks, Bitbucket Pipelines, or more complete options like Jenkins, DeployBotBuddy and, for sure, many others.

At inQbation we use DeployBot for some Drupal projects, you just have to connect it to your repository, configure the access to the server and (literally) copy/paste the shell instructions, so they run every time your branch is updated.

Bonus: You can add some integrations to get notified about every deploy process. You can set an automated email to be sent, or a message via Slack (our choice). This is very helpful to have quick access to the output of the Continuous Deployment process.

If you need someone to assist your business with continuos deployment for Drupal, we’re here and ready to give you a hand! Give us a call or drop us a message, anytime. 

Do you need some help?

Let's get started. Tell us a little about yourself and your organization
and we can start a conversation about your needs and our capabilities.

Related Posts