Git Slack Integration
Git Slack Integration
Course Overview
In this course, you will learn:
What is ChatOps
Key Players - Chat Client and Chat Bot
Role of ChatOps in AgileDevOps
Integration Capabilities
Integration of Chat Client Slack, Chatbot Jirio with GitHub
What is ChatOps?
Work together
Work better
Simplify daily operations
Team Collaboration and conversations happen in Chat clients and ChatOps is often
aided by a Conversational AI-based Bot that can trigger tasks and provide information
for simple English commands.
How ChatOps Works?
ChatOps connects people, bots, and tools in an automated and transparent workflow,
making information readily available from a chat window.
Why ChatOps?
ChatOps functionalities usually have bots that can connect to several apps. Bots are
capable of performing variety of tasks inside the chat, like:
Code deployment
Software test kick off
Issue logging and tracking
Server reboots
As an added bonus, chat application contains clear record of all discussions and scripts
executed—something very handy for*** root cause analysis and troubleshooting***.
Benefits of ChatOps
Rolling out ChatOps in an organization has the potential to provide a large number of
benefits like:
Increased collaboration
Increased Automation
Faster Incident Resolution
Knowledge Sharing
Higher Visibility
Cross Learning
Quick Fact
Chat Client is the keyplayer of ChatOps, where business wide collaboration happens.
Through this interface, users can communicate and share files with each other instantly.
Most Chat clients offer a wide range of third‐party integrations that can allow users to
receive notifications and begin interacting with services for information without the help
of a bot.
Chatbots
Chatbots can help DevOps teams in automating repetitive tasks which are otherwise
done manually by team.
Scheduling assistants
Activity reports
Team productivity ledgers
News Broadcast
Emojis ... thousands of bots can be integrated into chat rooms to post automatic updates
or trigger functionality when prompted.
As team collaboration moves from email to chat, DevOps is trying to automate the
testing and deployment of software using Chatbots.
Try various bot integrations and scripts in team chat rooms, and then adapt the ones
that work best for your team.
What is Slack?
Slack is a messaging app for teams. It brings all teams' communication and files in one place,
where they’re instantly searchable.
This video highlights some of the main features of Slack.
If you have trouble playing this video. Please download the root certificate and proxy certificate and
install.
Integrations in Slack
Here is a sneak peek into various integration capabilities available in Slack.
If you have trouble playing this video. Please download the root certificate and proxy certificate and
install.
What is GitHub
GitHub probably does not need any introduction. However, here is a quick refresher on GitHub.
GitHub is a web-based Git repository hosting service, which offers all of the distributed revision
control and source code management (SCM) functionality of Git. Watch this video to know
more!
If you have trouble playing this video. Please download the root certificate and proxy certificate and
install.
The GitHub integration for Slack helps in keeping a tab on the repositories.
This integration will issue notifications to specified channel in Slack for following types of
events.
Commit events
Pull requests
Issue events
Deployment statuses
Exercise#1 - Step 1
Creating GitHub Account
Exercise#1 - Step 2
Creating Slack Account
Create a new slack account using your e-mail address and a trial slack team by
visiting slack.com, as illustrated.
Explore Slack, if you are new to slack. Else, you can skip the starter tutorial.
Exercise#1 - Step 3
Exercise#1 - Step 4
This should have posted two updates in the slack channel, about the new branch
creation and the new commit.
Exercise#1 - Step 5
Click the Pull Request tab, and on the Pull Request page, click New Pull Requestt
button.
Select the base as master and the branch for comparing
Review the changes highlighted
Click the Create Pull Request button
Enter pull request a title and brief description of the changes.
Once done, click Create Pull Request!
This should have posted notification in the configured slack channel, updating about
the pull request.
Exercise#1 - Step 6
It’s time to bring your changes together. Merge the new branch into the master branch.
Click Merge Pull Request button to merge the changes into master.
Click Confirm Merge.
Once the merge is done, Delete the Branch
This should have posted notifications in the configured slack channel, updating about
the merge and branch deletion.
End of Exercise#1
Hope this was fun!
Now every time a team member makes a commit or request for pull, you can get to
know and act on it right from your chat window! Isn't that great!
However, when entire team uses GitHub Enterprise and you might not want to grant
blanket permission for Slack to read and write. Instead GitHub app will need to be set
up in unauthed mode.
In this mode Webhooks are used to interact and notify. Now, lets do another hands-on
exercise where Git and Slack are integrated in Unauthed mode.
Exercise#2 - Step 1
Exercise#2 - Step 2
Exercise#2 - Step 3
Test the Integration
Check the configured slack channel for the notification triggered during this process.
Choose Let me select individual events for Which events would you like to
trigger this webhook?
Now, you will see a list of events that can be selected to trigger a notification in slack.
In this module, we will work on a case study to understand these event notifications.
Exercise#3
Assume, you need to add a new feature to an existing project.
A userstory for this feature would have been created by the Stakeholder/BA.
A core project team of developers, designer and tester would start working on this
feature.
Not all notifications are equally important for both these groups. Hence,
notifications need to be configured such that, both these groups receive only the
notifications relevant for them.
Exercise#3 - Step 1
Create New SlackChannels
Exercise#3 - Step 2
Create Git Webhooks
In slack, click on Explorer > Apps & Integration > GitHub > Install
Create two separate Git integrations in unauthed mode using Webhooks for the new
channels
Configure Event triggers in the GitHub Webhooks to trigger only the notifications
relevant to the team.
This should have triggered a notification on respective channel updating about the
newly added integration.
Exercise#3 - Step 3
Event Notifications for Project Team
Star Project team members need to be aware of what each of their team members are
working on and when they are committing. Hence for starprojectteam enable
notifications for events like
Commit
Branch created/deleted
Deployment, Deployment status
Issues opened, comment
Member added/removed
Pull request open, review, comment
Update Push to repository
Exercise#3 - Step 4
Event Notifications for Stakeholders
Unlike core project team, for Stakeholders and Business users, not all events are
important. For stakeholders enable notification for events like
Next we will have few simple questions based on this integration. Good Luck!
Bot in ChatOps
Bots have a plethora of abilities through a very robust message system and well placed
hooks to various other tools. Bots can:
Send reminders
Post images
Translate text
Deploy code
Bots can dramatically improve and reduce user efficiency depending on how it is used.
Popular Chatbots
Hubot: Written in Node.js, Hubot executes commands written in JavaScript or
CoffeeScript. Has extensive library of plugins from community.
Lita: Written Ruby, Lita uses the Ruby ecosystem's standard tools (RubyGems and
Bundler) for plugin installation and loading.
Jirio Jirio is a specialized bot that integrates with Slack and JIRA as webhook and
provides a seamless approach to manage issues from Slack.
There are many other bots, with each having different plugins, pick the right bot based
on your project ecosystem.
Jirio bot integrates with Slack and JIRA as webhook and provides a seamless Slack and
JIRA integration for creating, managing and viewing JIRA issues from Slack.
To start with,
Go to slack channel and enter /jirio help.- This should list a number of slash
commands.
Chatbots Summary
Hope that gave you a fair idea about Chatbots and how one can use simple slash
commandsto manage issues in JIRA directly from chat window. This was just a
glimpse of the capability of Chatbot.
Do explore other features and other Chatbots. You might find a number of interesting
bots readily available to make your life simple!
Quick Fact
What is ChatOps
Chat Clients andin particular Slack
Chat Bots and in particular Jirio
Chat Client integration with GitHub
Chat Client integration with Jira
Jenkins
GitHub
Eclipse
Jirio
Hubot
Err
ChatOps is a collaboration model which offers a single and persistent location, for
___________ to collaborate with each other.
People, Bots and Tools
People
Contextual
Efficient
What is ChatOps ?
Tools
Technology
Collaboration Practice
Troubleshooting Issues
Flowdock
HipChat
Lita
Extensibility
"ChatOps primary aim is to move conversations away from e-mail and into business
chat tools." Is this statement correct?
True
False
Which of the following are the technical benefits that the teams can realize by
Increased speed of actions
Increased automation
Improved security
Logging Issues
Few Channels in Slack are listed with a lock symbol in the Explorer, because these
channels are ___________
Public
Personal
Exclusive
Private
Can Chatbot be used by a restaurant to take customer orders and make menu items
suggestions.
Yes
No
Collaborate on Problems