Sack Dev Collaboration gap with Heroku and Slack - ChatOps with Heroku
Heroku is the world’s most effective cloud development platform for building and delivering apps. Below are the four key areas of Heroku that enable teams to deliver engaging apps:
- Developer Experience
- Data Services
In this blog post, lets uncover how collaboration can add value to Heroku Flow. Heroku Flow is one stop solution that brings together Heroku Pipelines, Review Apps, Heroku CI and GitHub integrations into an easy-to-use structured workflow for continuous delivery. With no further delay, let’s setup our Heroku Pipelines and integrate it with Github:
1) Login to Heroku and create an application with pipeline defaulted to staging.
2) Configure automatic deploys and connect Github.
3) Enable review apps which will create a new app every-time a pull request is raised in Github. Also, add a PROD app to promote the future changes.
4) Enable Heroku CI for automated tests
5) Open pull request with corresponding review app build and tested. Pull requests trigger Heroku CI to run test.
6) Merge the PR to deploy to staging.
7) Promote to the staging changes to production.
Integrating Heroku with Slack:
Heroku ChatOps uses the power of [Heroku Pipelines] (https://devcenter.heroku.com/articles/pipelines) to bring a collaborative deploy workflow to Slack. First authorize Slack using the below URL:
Just like Heroku CLI, we will be using Slack Slash commands to interact with the Heroku pipelines. Slash commands are processed as shown below:
Open Slack and go to SlackBot channel to use the slash commands to enable ChatOps.
Use the below command to login to Heorku and Github form Slack Bot:
Make sure user has a deploy permission in Heroku and write permission in Github.
In order to deploy code to app, use the below command from the Slack Bot:
/h deploy PIPELINE_NAME to STAGE_NAME
Use the below command to deploy a specific branch:
/h deploy PIPELINE_NAME/BRANCH_NAME to STAGE_NAME
In order to deploy to multiple apps use the below command:
/h deploy PIPELINE_NAME to STAGE_NAME/APP_NAME
Use the below command to promote the app to Prod
/h promote PIPELINE_NAME from UPSTREAM_STAGE
We can also route the notifications to different channels using the below command:
/h route PIPELINE_NAME to #CHANNEL_NAME
This way Heroku, Github and Slack integration help to use a simple, mobile-ready CLI for continuous delivery that works everywhere. Happy ChatOps everyone!
Keywords: #SFDCBrewery #SriharideepKolagani #Heroku #ChatOps #Salesforce #Slack #CI #CD #Github #SalesforceCertification