Connecting GitLab Community Edition with Jira: Integration Options?

Hi everyone! I’m trying to set up a connection between our self-hosted GitLab CE and Jira. We’re hoping to do a few things:\n\n1. Connect git commits to Jira issues\n2. Update Jira issue status based on git commits\n3. Limit these actions to certain branches (like master)\n\nThe problem is, GitLab CE doesn’t have built-in Jira integration like the Enterprise Edition does. We’re using GitLab CE 7.8.2 and Jira+Agile 6.4.\n\nHas anyone found a way to make this work? Maybe there’s a plugin or workaround? I’d really appreciate any tips or suggestions. Thanks in advance for your help!

I’ve faced a similar challenge and found a workable solution. While GitLab CE lacks native Jira integration, you can achieve your goals using webhooks and a custom middleware.

Set up a webhook in GitLab to send push events to a custom server.

Create a simple server (I used Node.js) to receive these webhooks and process the commit messages.

In your server, parse the commit messages for Jira issue keys and use Jira’s REST API to update issues.

Implement branch filtering in your server code to limit actions to specific branches.

For commit linking, you can add the GitLab commit URL to the Jira issue comments.

This approach requires some coding, but it’s flexible and can be customized to your exact needs. It’s been reliable for our team, handling hundreds of commits daily.

hey luke, i’ve been there too. try gitlab-jira-integration on github – a python script that sets up webhooks for commit linking, issue updates & branch filtering. it works great with ce. good luck!

Having worked with both GitLab CE and Jira, I can share a solution that worked well for our team. We utilized a combination of GitLab’s web hooks and a custom script to bridge the gap.

We set up a web hook in GitLab to send push events to a dedicated server. On this server, we ran a Python script that parsed the incoming data. The script extracted relevant information like commit messages, branch names, and issue keys.

For linking commits to Jira issues, we used Jira’s REST API. Our script would scan commit messages for issue keys and update the corresponding Jira tickets with links to the GitLab commits.

To update Jira issue statuses, we defined keywords in commit messages (e.g., ‘fixes’, ‘closes’). When these were detected, the script would transition the Jira issue accordingly.

For branch filtering, we simply added a condition in our script to only process events from specific branches.

This approach required some initial setup and maintenance, but it provided us with the functionality we needed without upgrading to GitLab EE. It’s been running smoothly for over a year now, handling our integration needs effectively.