How can I improve my efficiency as a developer?
This post was originally published on the Acquia blog at Connecting the Tubes: JIRA, GitHub, Jenkins, and Slack.
There are plenty of tools that can improve your efficiency, but sometimes 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 your tools to one another and have them do the coordination work for you. In this article, we'll look at 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 JIRA to GitHub . Once JIRA and GitHub are connected, then all related pull request, branch, and commit information will appear on your JIRA tickets, as you can see in the screenshot below. Just make sure that you put the JIRA ticket ID in your commit messages. For example, “EX-101 This is my commit message for ticket EX-101!”.
- Connect Jenkins to GitHub using the Jenkins GitHub Plugin . This allows Jenkins to trigger builds based on commits to your GitHub repository.
- Connect JIRA to Jenkins using the JIRA Plugin for Jenkins , which allows you to update JIRA tickets after a build.
Jenkins can then add comments to tickets or update ticket statuses.
- Connect Jenkins to Slack using the Jenkins Slack Plugin . This allows Jenkins to post various notifications to Slack for you 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.