Connecting the Tubes: JIRA, GitHub, Jenkins, and Slack

July 17, 2015
11
1

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:

 

Agile

JIRA Plug-In for JenkinsJIRA Comments

  • 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.

Slack notifications

 

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. Workflow

Sign-up for our Developer Blog Newsletter

Thanks!

Add comment

By submitting this form, you accept the Mollom privacy policy.

Jenkins question

Hey, great post. I was wondering how you use Jenkins with Drupal?

Interesting and informative.

Interesting and informative.

Nice...

Nice integration of Jira and Slack

Jenkins

What other uses does Jenkins have?

Good Info

Very informative. I wasn't aware of the Slack plugin.

Jira

Interesting, but what if we're not using Jira, but another issue tracking system?

Awesome workflow

This is really cool. I use github and jira, never heard of slack and jenkins, this is very interesting and will have to look further into it.

Jira and Bamboo

Hi, we use the Atlassian stack, and have Jira, Stash and Bamboo. (where stash ~= github and Bamboo ~= Jenkins)
The integration is seamless and we can run drush via scripts to check for coding standards and run simpletests on every commit.
I like the idea of getting a notification via chat, but we use email. Haven't used slack yet.
I wonder if this can be integrated with g+ and hangouts?

If you work for a company who

If you work for a company who uses Bitbucket instead of Github (like I do), you can also create a slack bot to monitor commits to you r bit bucket repos and report on it in the relevant channels.

Similar

We use a similar setup but with Bamboo. Would you recommend Jenkins over Bamboo?