Continuous Integration

Continuous Integration is the process of automating, testing, and merging of code changes into the main path to production. Rather than making large periodic updates to a Drupal or WordPress site, changes are deployed in very frequent, smaller batches. Instead of having a lengthy quality assurance process, various layers of testing are usually run automatically. If these tests pass, the changes are ideally ready for deployment.

When making theme or functionality change, such as adding a new section to a Drupal or WordPress website, collaborating can be a difficult process, as each developer’s version of the the code regularly becomes out of sync with the other team. Additionally, launching final changes as a single deploy can be hazardous and requires lengthy quality assurance. Continuous Integration provides a method of reducing these risks and speeding up overall development time.

Continuous Integration is often confused with continuous delivery and continuous deployment. Continuous Integration is simply the practice allowing developers to regularly send and receive code between their own local copy and the shared working copy of the codebase. This allows for continuous delivery, where changes can be sent to production regularly. Finally, continuous deployment is an ideal state in which the entire process of deployment to production is automated if testing passes.

Pantheon’s infrastructure was built with Continuous Integration in mind. Creating a workflow where code is automatically tested before deployment is not a technical hurdle as much as it is a change in cultural mindset and a commitment to writing good tests. Once an organization is determined to reallocate their time spent fixing post-deploy bugs to pre-deployment testing, automated testing is a simple matter of choosing one of the many tools which integrate easily with Pantheon.


CIrcle CI

CircleCI is a continuous integration platform. When connected to a Drupal or WordPress site, changes made in version control, either in Pantheon's repository or external code repositories such as GitHub, alert CircleCI to kick off a build of the application and execution of a predefined testing suite. Based on the results of the tests, CircleCI will deploy the changes to a predetermined location, such as a multidev environment, or the master branch dev site. It is a Saas platform which works with many languages besides PHP, and will also integrate with other applications, to provide notifications in a team's messaging app, for example.

On each code change that is pushed by a team member, CircleCI can be configured to create a new Pantheon Multidev environment . This ensures that the code is being tested on a duplicate environment to production. Other tasks, such as CSS aggregation and minification can be automated. After successful completion, cleanup tasks, such as deletion of the Pantheon environment can be automated.

[BLOG] Testing WordPress Plugins on Pantheon with CircleCI
[BLOG] How Pantheon Tests Drupal 8 Updates
[DOC] Using GitHub Pull Requests with Composer, Circle CI, and Drupal 8


Travis

Travis is a continuous integration platform, similar to CircleCI. It integrates with GitHub, Bitbucket, and other applications. Travis creates application builds and runs testing suites when code changes are pushed. It can be configured to run against multiple parameters, such as different PHP versions.

Travis can be configured to use Terminus, Pantheon’s command line tool to create Multidev instances, which can run automated tests on a duplicate but isolated environment from a Drupal or WordPress site’s live environment. As Pantheon also allows for newer PHP versions to be tested before changing in production, Travis offers multiple layers of testing very easily. Travis also has a built-in cron feature, allowing for nightly or hourly builds without using a separate service for scheduling tasks.

[BLOG] An Example Repository to Build Drupal with Composer on Travis


Jenkins

Jenkins is an open source automation server, which is installed and maintained by the user, as opposed to platform services such as CircleCI or Travis CI. It is extendable with plugins and works with Git. It allows for a wide range of configuration and customization. Builds, testing, and other functionality can be triggered on commit or pre-scheduled. As this is not a managed solution, and support is largely community-based.

Jenkins can be installed on an external server and can be configured to trigger Terminus commands on Pantheon. This can be used to run testing on Multidev or the Test environment of your Drupal or WordPress site. Jenkins can also be used for running scheduled tasks, such as executing cron on a specific environment, or checking for available updates.

[DOC] Automatically Test and Deploy GitHub Changes to Pantheon from an Existing Jenkins Server


DeployBot

DeployBot is a continuous integration service with a friendly user interface. Instead of managing options with yml files, DeployBot offers an easy web GUI. For sites that already use external Git hosting, DeployBot can be integrated into your workflow to test and deploy sites that require additional build steps.

Continuous integration solutions make sure that each step in your deployment process gets executed with machine precision. Avoiding human error, especially in a repeatable process such as manage dependencies or compiling JavaScript and CSS files, helps free up resources while preserving the sanity of developers.

[DOC] Deploy to Pantheon from an External Repository using DeployBot

Workshops for Dev Teams

Looking to optimize your dev team and streamline your internal workflows? Pantheon delivers custom workshops to help development teams master our platform and improve their internal DevOps. These tailored trainings are delivered in-person or remotely and designed just for your team!

SEE WORKSHOPS
  • ASSISTED MIGRATIONS

    We will migrate your (qualified) sites to Pantheon for free.

  • DEVOPS WORKSHOPS

    Customized trainings made to fit your team’s needs.

  • PANTHEON EXPERTS

    Learn from Pantheon ACEs, our top technical resources.

SEE WORKSHOPS

Additional Resources