Every Thursday, MindTouch delivers a new release of our software to all MindTouch customers. MindTouch development teams work in a synchronized two week cadence, known in Agile development philosophy as a “sprint”, to complete bug fixes, performance optimizations, and features for the two Thursday releases encompassed by the sprint. In 2011, after deciding to switch our software management system from Subversion to Git, it made perfect sense for MindTouch to use the Git-powered GitHub site to house our code. GitHub has empowered MindTouch developers, testers, and release engineers to create workflows that increase confidence in the quality of code being shipped.
By storing MindTouch code on GitHub, MindTouch has a powerful platform for software development collaboration. MindTouch developers can make a copy of the core codebase on their workstation and work on a specific feature or optimization without disturbing others’ work or the stability of the code in QA or production. Developers can pull in changes from others working on the codebase to collaborate on a particular feature. When work is complete and it comes time to submit the changes back, GitHub provides a great access controlled code submission system, known as pull requests. As a result of it being so integral to our development process, GitHub has become a big part of MindTouch’s engineering culture.
MindTouch’s GitHub based release workflow is designed to keep things always moving forward and never slow down developers. The MindTouch repository’s “master” branch is the starting point for all development. It represents stable code and is identical to the code that is currently running in production. Developers can easily checkout copies of the master branch on their workstations, each copy generally representing the beginning of a bug fix, research item, or new feature. Each copy, known as a “branch”, is completely isolated from the other, and context can easily be switched between branches.
Release candidate branches are copies of the master branch as well, with three release branches being in play at any given time:
- The current release branch: Currently on the production application servers. The master branch, the starting point for all development for the week, is identical to this branch.
- The frozen release candidate branch: Currently in QA (Quality Assurance), and running on MindTouch’s staging application cluster. The next cluster of production application servers will be built from this branch.
- The open release candidate branch: Open for pull requests. Sometimes referred to as “next next”, this branch will become the next frozen release candidate branch, after the current frozen release candidate branch is released to production.
The workflow for large features that will not ship within a sprint is very similar, except the work is submitted to an internal feature review branch. When the feature review branch is code complete, tested in isolation, and approved by all stakeholders it will be submitted to the next open release candidate branch. In keeping with the Agile software development tenant of “always complete shippable code within a sprint”, a feature review branch is always in a working state where it could hypothetically be shipped.
There are a lot of rules to follow when it comes to handling continuous delivery of software to our customers, especially administrating the revolving release candidate branches. Human error does occur, and a developer may submit a change to a frozen release candidate branch. Our release engineers have better things to do than sit around and accept or deny pull requests, so our MTBOT watchdog automates the approval or rejection of pull requests, as well as many other GitHub workflow tasks. MTBOT is fun internal project driven by F# and the GitHub RESTful API. MindTouch API Engineer, César Natarén will be writing in greater detail about MTBOT and all the wonderful ways it helps us be happy and productive software developers.
Learn how MindTouch delivers production code to our customers on release day! Our previous post explains it all: Delivering Scalable Software in the MindTouch Cloud
Get in touch with Andy on Twitter (@modethirteen)