There are plenty of tools that can improve your efficiency, but they can become burdens rather than real helpers. That’s because they don’t talk to each other, and so you’re forced to do a lot of manual work -- you’re the hub that connects all the spokes. It needn’t be that way. You can become far more efficient and improve your workflow if you connect them to one another and have them do your coordination work for you. In this blog post, I’ll show you how to do that using JIRA, GitHub, Jenkins, and Slack.
First, let’s look at the dream workflow for a developer:
- You find a ticket to work on and claim it.
- You do your work.
- You type a single command to submit a pull request for your work.
- You receive a direct message indicating whether your work was merged.
JIRA is up to date. GitHub is up to date. Jenkins is up to date.
That’s it! Notice what you didn’t do. You didn’t update JIRA. You didn’t kick off automated tests in Jenkins or push to multiple remotes in GitHub. You didn’t even log in to a website to check the status of your pull request or ticket. That’s how the world should work.
What magic happened?
- Tickets moved on their own in JIRA. The tickets contained references to your code and pull requests.
- Comments were made on JIRA indicating that tests passed or failed.
- Tests were run automatically.
- Code was pushed to the right places
- You received a direct message.
All this all happened because JIRA, GitHub, Jenkins, and Slack talked to each other. It’s easy to set this up. Here’s how to do it:
- Connect Jenkins to GitHub via the Jenkins GitHub Plugin. This allows Jenkins to trigger builds based on commits to your repository.
- Connect JIRA to Jenkins. The JIRA Plugin for Jenkins allows you to update JIRA tickets after a build. Jenkins can then add comments to tickets or update ticket statuses.
- Connect Jenkins to Slack via the Jenkins Slack Plugin. This allows you to post various notifications to Slack after a build is complete, as you can see below.
That’s all it takes. Do all this and you’ll become far more efficient and have a dream workflow -- the one you see outlined below. Your DevOps team may even thank you and buy you a beer.