ChatOps (public beta)
Last updated 26 June 2017
Table of Contents
Heroku ChatOps is currently in public beta. Please contact firstname.lastname@example.org if you have feedback or questions.
How it works
Heroku ChatOps uses the power of Heroku Pipelines to bring a collaborative deploy workflow to Slack.
Heroku ChatOps also provides some additional features over a traditional Heroku deploy. When you deploy using Heroku ChatOps, we’ll check your required status checks on GitHub to ensure that you’re only deploying code with passing tests. We’ll also notify GitHub that your code has been deployed so that your pull requests will have a record of successful or failed deploys.
Installation and setup of Heroku ChatOps requires Slack permissions to add and approve apps. More information on Slack app management is available here.
Since Heroku ChatOps is built around pipelines, your applications will need to be in a pipeline to take advantage of the features.
Click here to get started:
Setup your account
Deploying code to an app
There are two ways to deploy your code to an app using Heroku ChatOps, the deployment flow or Pipeline promotions. With both deploys and promotions, we’ll use Slack threads to provide updates along the way, from when the deployment or promotion starts, to when your last dyno has finished restarting.
Each step is saved in a thread:
/h deploy PIPELINE_NAME to STAGE_NAME
Deploying a specific branch
/h deploy PIPELINE_NAME/BRANCH_NAME to STAGE_NAME
Deploying when you have multiple apps in a stage
/h deploy PIPELINE_NAME to STAGE_NAME/APP_NAME
Forcing a deployment even if pre-deploy checks are failing
If you try to deploy an app when a required status check is failing , it will refuse to deploy.
You need to force the deployment using
/h deploy! PIPELINE_NAME to STAGE_NAME
Pipeline promotions have a few additional benefits over manual deployment workflows. For example, they ensure that a release to production contains the exact same compiled code as a release to staging, and promotions will also be faster than recompiling the slug.
By default, it will promote from staging to production.
/h promote PIPELINE_NAME
You can also specify an upstream stage. It will promote from the specific upstream stage to production.
/h promote PIPELINE_NAME from UPSTREAM_STAGE
Multiple apps in a stage
If you have multiple apps in your upstream stage, you’ll need to specify a source app to promote from.
/h promote PIPELINE_NAME from UPSTREAM_STAGE/APP_NAME to DOWNSTREAM_STAGE
If you have multiple apps in the downstream stage, you’ll need to specify which downstream app you’d like to promote to.
/h promote PIPELINE_NAME from UPSTREAM_STAGE/APP_NAME to DOWNSTREAM_STAGE/APP_NAME
Or you have multiple apps in the downstream stage, you can also specify a list of target app separated by a comma.
/h promote PIPELINE_NAME from UPSTREAM_STAGE/APP_NAME to DOWNSTREAM_STAGE/APP_NAME,APP_NAME2
Or another way to promote to multiple apps in a downstream stage is by specifying that you’d like to promote to all downstream apps.
/h promote PIPELINE_NAME from UPSTREAM_STAGE/APP_NAME to DOWNSTREAM_STAGE/all
Forcing a promotion even if pre-deploy checks are failing
If you try to promote an app without having the required contexts, it will refuse to promote. You need to force the promotion to bypass the check.
/h promote! PIPELINE_NAME
Viewing latest releases
You can view the latest code deploys and configuration changes for the default stage.
Releases for production stage
/h releases PIPELINE_NAME
Releases for a specific stage
You can also specify a stage, like
/h releases PIPELINE_NAME in STAGE_NAME
/h info PIPELINE_NAME
You can obtain a list of deployable pipelines.
Route pipeline events to a room
If you’d like to be notified about GitHub related events, like pull requests opening or your tests passing, you can route pipeline related notifications to your team’s slack channel.
Route Pipeline’s notifications to a room
It will route notifications to the specified channel.
/h route PIPELINE_NAME to #CHANNEL_NAME
Stop routing Pipeline’s notifications to a room
It will stop routing the notifications to the current configured channel.
/h route:disable PIPELINE_NAME
Reach out to us at email@example.com with any issues, feedback, or questions.