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:
Upcoming UI revision:
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.
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.