This is a Heroku Buildpack you can add to your Heroku deployments that will notify a Slack channel every time your application is deployed.
- Visit https://api.slack.com/incoming-webhooks to create a new Slack Application that can receive a webook. You only need the "Incomming Webhooks" feature.
- As part of the configuration, you will choose a workspace and channel to connect the application to.
- Take note of the webook URL, which looks something like this
https://hooks.slack.com/services/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S
- Feel free to configure the app's icon and name!
- Enable Dyno Metadata for your application
heroku labs:enable runtime-dyno-metadata
- Save your new webook URL as a Heroku config setting for the variable
SLACK_DEPLOYMENT_WEBHOOK_URL
, i.e.:heroku config:set SLACK_DEPLOYMENT_WEBHOOK_URL="https://hooks.slack.com/services/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S"
- Add this buildpack via the Heroku dashboard using the URL
https://github.com/salesforcedevs/custom-heroku-buildpack-notify-slack-deploy.git
(theheroku buildpack:set
command will replace any buildpacks you already have).
- Note: Be sure that this buildpack is the final buildpack in your app - the order matters!