Editor's Note: Heroku Pipelines is now Generally Available. Learn more about Continuous Delivery at Heroku.
At Heroku we're building a solid platform for delivering apps in a deliberate, reliable manner. We know that reasoning about the state and progress of code changes, testing and verifying what's deployed, and tracking what works can all be difficult — especially for non-engineering team members.
So we’re proud to introduce Heroku Flow, a new and flexible way to structure, support, and visualize Continuous Delivery for Heroku apps from development to production. Heroku Flow does for Continuous Delivery (CD) what pull requests have done for code review: make CD visual, easy to manage, and accessible to all team members from design, to engineering, to product management, to QA and testers. It does this with the support of three features and integrations:
- Pipelines: a clear and structured workflow for a group of apps that share the same codebase
- GitHub Sync: automatic or manual deployment of Pull Requests (PRs) on branches to staging apps
- Review apps: automatic creation of a disposable “Review App” for each new GitHub PR.
The backbone of Heroku Flow is Heroku “Pipelines”, out now in public beta.
The Pipelines interface — a new page you'll notice in your Heroku web interface — facilitates and visualizes the best practices in CD that we all know and love: frequent iteration, test, deployment to staging, and promotion to production. The “Pipeline,” strictly speaking, is a clear and structured workflow for a group of apps that share the same codebase. Initially we will support four stages: “review” (read on), "development," "staging," and "production."
Many of our customers are already adopting the convention of naming apps this way: “my-app-dev,” “my-app-staging,” “my-app-prod.” We are now codifying that pattern, and managing the journey of the code through these stages. You’ll find that Pipelines is quite smart about recognizing existing apps you’ve named this way and placing them in the right stage.
Apps can be “promoted” to the next stage in the Pipeline with a click in the web interface, or by using the CLI. In either case, the relationship between the stages of your apps in the Pipeline is always clearly diagrammed live on the Pipelines page (e.g. you might see that production is behind master by three commits). Awareness of the current relationships between apps in a pipeline will provide a better view of the state of development of apps of all kinds.
When a given PR is merged, and the code merged to master (or another branch of your choice), Heroku can automatically deploy the branch to staging, via our GitHub Sync that was released for GA in May. Or you can choose to deploy manually within the Heroku interface.
Pipelines can be configured to deploy specific branches to specific apps when pushes occur, either automatically, or manually as needed.
Heroku Review Apps, now also in beta, makes Pipelines even more interesting. For each new GitHub pull request (“PR”), Heroku will spin up a disposable “Review App” with a unique URL for the development team to review and test. Now, instead of guessing what the new code might do, reviewers — including designers, testers, and PMs — can receive a link and actually try it out in a browser, before the code reaches staging or production environments.
Review Apps are also visualized live in the Pipelines area of the Heroku web interface. When PRs are created in GitHub, or builds finish, Review Apps or deployments will appear in the Heroku Pipelines overview.
And the workflow and features are all compatible with orgs and fine-grained access controls, in ways that make sense for the roles involved. Different users may have different permissions on apps in various stages, so that only certain users, for example, may promote to staging. Orgs can track usage of Review Apps (and are billed for the dynos and add-ons that get used).
Review Apps provide easier and better testing for features and fixes in isolation, and Pipelines provides better structure for testing and deploying the resulting app. It’s all part of Heroku Flow: better structure for teams to iterate, test, deploy, and run software.