Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Live deployment previews for Drupal Core (Thanks to TugboatQA!)

Parent Feed: 

Tugboat.qa offers automated and on-demand deployment previews to accelerate development. In 2019, Tugboat was successfully integrated as the backbone of the community testbed Simplytest.me. Following that success, a community-lead initiative emerged to provide these previews for all of Drupal Core development, by integrating into the Drupal.org issue queue. Drupal Association CTO Tim Lehnen (hestenet on Drupal.org) opened an issue to explore this option in early August.

Why automated environments for Core issues?

Reviewing and testing Drupal.org issues has historically been the purview of experienced Drupal developers. Designers, end-users, and other stakeholders have been relegated to the role of watching over the shoulder of developers who drive demos from local development environments. This has been detrimental to fully involving those stakeholders in a development process that could improve Drupal for all users. With Drupal's ease-of-use, accessibility, and front-end features being central to the current strategic initiatives, it was time to ensure that these stakeholders are fully empowered. 

Automated deploy environments help bridge the technical divide and bring the ability to review changes to more users. Longtime Drupal contributor YesCT says:

The Tugboat integration with drupal.org issues makes reviewing and testing possible for people who have never been able to do it before. This project uses technology to lower the barriers of contributing to Drupal, and makes contributing more accessible to more people. It’s going to be a huge game-changer.
YesCT

In practice, visitors to the Drupal.org issue queue can click a link to tour a live, working version of a Drupal website wherever Tugboat deploy previews are enabled. As of November 10, 2020, this includes all Drupal Core issues.

Current UI:

Current UI for live previews in Drupal core issues

Upcoming UI revision:

Upcoming ui revision for live previews on Drupal Core merge requests

Drupal.org deploy previews - under the hood

The Drupal.org/Tugboat integration relied on a handful of contributors across a project that spanned months, but the core of this collaboration was a partnership between core contributor Juampy NR and Drupal.org architect Neil Drumm

As a senior developer at Lullabot, Juampy's continuous integration expertise, as well as his familiarity with Tugboat, made him an invaluable contributor to implementing the Tugboat side of the integration. Neil's expertise as architect, meanwhile, gave Juampy and Tugboat the guidance to find the right places in Drupal.org's custom logic to add code for this new integration. Simultaneous to the Tugboat integration, Juampy and Neil also worked to implement the Drupal Association GitLab integration, bringing issue forks and merge requests to the issue queue

Some of the challenges that this team faced included:

  • Drupal.org’s large database. Because of the size of the database, the team had to work remotely using a provisioned development environment. Remote debugging helped to catch and traverse the different events involved in the workflow.

  • Understanding where to write code. Drupal.org has a ton of custom logic, so finding the right place to add new code was not easy. The Drupal Association's guidance was key.

  • Integrating multiple systems. The team had to write interactions between Drupal.org, Tugboat, and GitLab, taking into account error responses, timeouts, and firewall restrictions.

Deployment preview workflow

Reducing friction by making changes visible and more accessible to all contributors

Before this integration, contributors had to take and upload screenshots of their changes, and reviewers had to replicate changes locally in order to see them in action. Tugboat reduces friction by making changes visible - and more accessible - to anyone who clicks the preview URL. This shortens review time considerably and invites participation from non-developers, working toward Drupal's value of respecting and valuing inclusivity.

Check out our documentation on Drupal.org to learn more!

The Drupal Association gives our thanks to TugboatQA/Lullabot, for contributing this feature to the Drupal project.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web