Continuous Delivery – A trending word in the world of technology. Continuous Delivery(CD), along with Continuous Integration(CI), is becoming a popular term even with the non-technical people. And hence, every IT company is seeing a flood of clients coming with the demand of both of them. Both of these techniques – CI/CD are closely associated with the quality-oriented work methodologies – Agile and DevOps. And so are we!
Team AddWeb has been for years been associated with and following Agile and DevOps. Just as we’re associated with Drupal. No wonder, we have been ardently following continuous delivery with Drupal for years now. So let us first throw some light on this popular concept of ‘Continuous Delivery with Drupal’.
What is Continuous Delivery?
Continuous Delivery is a process of automatically deploying all your changes made on development stage, directly to the production stage. This kind of delivery is done by accepting all the unit-cases followed by coding standards. Once the code is merged with the stage branch from the development branch, the same stage branch also gets an automatic update with the help of Jenkins and git-webhook, which is triggered by merging the branches. A similar process of automatic delivery is also followed on the production site; where the code is merged with the master branch from stage branch, which is later deployed to the production servers.
Team AddWeb, as we mentioned previously, has been persistent followers of CD with Drupal via Jenkins, Ansible, and RocketChat. We believe, in today’s day and age, CD, and CI hold so much of significance because one can define repetitive tasks for one time and then on every build the same mentioned steps will run in order to update the new content. And when we speak of so much so of its importance, let us also share the tools, block diagram and process that we, at AddWeb, choose to follow for Continuous Delivery.
CD/CI Tools Used by Team AddWeb:
There are multiple tools that can we used to follow the process of Continuous Delivery. Let us share the ones that we, at AddWeb, have been using for years. You can consider this as a recommendation from us, for the amount of experience we hold in using them successfully for all these years.
Block Diagram Used by Team AddWeb:
Just as a picture is worth a thousand words, a diagram for us – the techies, is worth a hundred written words. We at AddWeb, do understand and empathise with this fact and hence, here’s the block diagram that we personally use for Continuous Delivery.
Process Followed by Team AddWeb:
Every developer has their own process to be followed for Continuous Delivery. Here’s the one that team AddWeb choose to follow:
As soon as the developer pushes code into the git repo, a webhook will be triggered. This will call Jenkins, which will further run the Ansible playbooks. These Ansible playbooks comprise of the code of delivery process, which is eventually followed by sending a push notification to the RocketChat server once the code is successfully built. One also receives this push notification in case of built failure condition.
Pipeline code is written in Ansible playbook for a continuous delivery process:
– Create a backup of code and database
– Pull the latest code on the server by git pull
– Run composer install for Drupal-8 sites to install new modules, libraries
– Run drush updb -y
– Run drush cim -y
– Run drush cr
– Send notification of successful build or failed build job details into Rocketchat
Hope the overall understanding and the provided guideline regarding the much-talked about and significant Continuous Delivery has proven helpful to you. In case, you have something to add on to the above information or even correct anything, feel free to contact us. Also, you can share what do you want us to share in our next blog. We’re all ears for suggestions and recommendations.