📣 Attention Salesforce Certified Trailblazers! Link your Trailhead and Webassessor accounts and maintain your credentials by December 14th. Learn more.
close
trailhead

Learn About Heroku Flow and Its Features

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe a common continuous delivery workflow with Heroku Flow.
  • Name the features of Heroku Flow and describe the purpose of each.

Heroku Flow is an easy-to-use structured workflow for continuous delivery on the Heroku platform. It brings together Heroku Pipelines, Review Apps, Release Phase, Heroku CI, and GitHub and Slack integration for a simple visual code-to-production workflow.

A common Heroku continuous delivery workflow looks something like this:

  1. A developer or team member creates a Heroku Pipeline and starts adding apps.
  2. A developer creates a pull request to make a change to the codebase of an app.
  3. Heroku automatically creates a review app for the pull request, allowing developers to test the change.
  4. When the change is ready, it’s merged into the code’s master branch.
  5. The master branch is automatically deployed to a staging app for further testing.
  6. If Heroku CI or Release Phase is configured, tests and tasks run to check if there are any problems with changes to the code or with the tasks that Release Phase is set up to handle (such as database migration).
  7. When all is ready, the staging app is promoted to production, where the change is available to end users.
  8. If the pipeline is integrated with Slack, a notification is posted in the room when a pull request is created and the code is merged back to master, updating the team with the status and results of CI tests and Release Phase tasks. Team members with the right permissions are also able to deploy apps to staging or promote them to production from within the Slack room.

Note: We do not cover how to set up Heroku ChatOps (Slack Integration) in this module, but you can learn more in our documentation.

It’s time to get to know Heroku Flow’s features and understand the purpose of each.

Heroku Pipelines

A pipeline is a group of Heroku apps that share the same codebase. Each app in a pipeline represents one of these steps in a continuous delivery workflow: Review, development, staging, and production. The pipelines overview page helps you visualize your apps progress, as well as meta-information about the status of each stage. For example, you can see whether your production app is running different code than staging.

GitHub Integration

Connecting a Heroku Pipeline to a GitHub repository makes it possible to manually or automatically deploy a branch on every GitHub push. For every deploy you can see the diff between the current release and the previous commit in the app’s Activity tab in the Heroku Dashboard, so you’re never guessing what code is on the app. If you’ve configured your GitHub repository to use Heroku CI or an external continuous integration (CI) server, you can configure Heroku to only auto-deploy a branch after CI passes for a particular commit.

Review Apps

Review apps are a new way to propose, discuss, and decide whether to merge changes to your code base. For Heroku apps connected to GitHub, Heroku can manually or automatically spin up a temporary test app on a unique URL for every opened pull request (PR). The temporary app is auto-updated on every commit, so instead of guessing about what the code does, reviewers can actually try the changes in a browser.

Release Phase

Release Phase makes it possible to run tasks before a release is deployed to production, eliminating maintenance windows and reducing deployment risk. Use Release Phase to migrate a database, upload assets to a content delivery network (CDN), invalidate a cache, or run any other task your app needs to be ready for production. If a Release Phase task fails, the new release is not deployed, leaving the current production release unaffected.

Heroku CI

Heroku CI is a low-configuration test runner that integrates with Heroku Pipelines. Heroku CI runs your test scripts with zero queue time for faster results, using disposable apps that have parity with your staging and production environments. Access test results from Heroku or GitHub, automate deployments conditionally on CI results, and take advantage of a fully visual interface built to support CI’s role in team-based continuous delivery.

Heroku ChatOps

Heroku ChatOps uses the power of Heroku Pipelines to bring a collaborative deployment workflow to Slack. It enables developers to deploy to staging or promote to production from Slack. With Heroku ChatOps, teams can keep track of all code changes within their Slack channel. Pull request notifications, merges, and CI build results all show up in Slack, so no context switching is needed to see build results or check if promoting to production was successful.

retargeting