About Gitlab Com Blog 2021 04 12 Gitlab Jira Integration Selfmanaged
About Gitlab Com Blog 2021 04 12 Gitlab Jira Integration Selfmanaged
Blog / Engineering
integration
Tye Davis ·Apr 12, 2021 · 13 min read · Leave a comment
This is the second in a series of posts on GitLab Jira integration strategies. The first post explains how to integrate GitLab.com with Jira Cloud.
The advantages of a GitLab Jira integration are clear:
One GitLab project integrates with all the Jira projects in a single Jira instance.
Quickly navigate to Jira issues from GitLab.
Detect and link to Jira issues from GitLab commits and merge requests.
Log GitLab events in the associated Jira issue.
Automatically close (transition) Jira issues with GitLab commits and merge requests.
Here's everything you need to know to achieve a GitLab Jira integration.
Pre-Configuration
As you approach configuring your GitLab project to Jira, you can choose from two options that best fit your organization's needs. You can either:
Use a service template by having a GitLab administrator provide default values for configuring integrations at the project level. When enabled, the defaults are applied to all
projects that do not already have the integration enabled or do not otherwise have custom values enabled. The Jira integration values are all pre-filled on each project's
configuration page for jira integration. If you disable the template, these values no longer appear as defaults, while any values already saved for an integration remain
unchanged.
Configure integrations at a specific project level that will contain custom values specific to that project and that project alone.
It should be noted that each GitLab project can be configured to connect to an entire Jira instance. That means one GitLab project can interact with all Jira projects in that instance,
once configured. Therefore, you will not have to explicitly associate a GitLab project with any single Jira project.
GitLab offers several different options that allow you to integrate Jira in a way that best fits you and your organization's needs based on how you’ve set up your Jira software. Let’s
take a deeper look into how to set-up each of these available options.
Configuring Jira
The first step in setting up your Gitlab Jira integration is having your Jira configuration in order.
Jira Server Jira Server supports basic authentication. When connecting, a username and password are required. Note that connecting to Jira Server via CAS is not possible. Set up
a user in Jira Server first and then proceed to Configuring GitLab.
Jira Cloud Jira Cloud supports authentication through an API token, and in order to begin the process you need to start by creating one within Jira. When connecting to Jira Cloud,
an email and API token are required. Set up a user in Jira Cloud first and then proceed to Configuring GitLab.
Create an API token here: https://id.atlassian.com/manage-profile/security/api-tokens
Log in to id.atlassian.com with your email address. It is important that the user associated with this email address has write access to projects in Jira
Click Create API token.
Issue Tracker ID
To set up a individual project template:
1b. To enable the Jira integration in a project, navigate to the Integrations page and click the Jira service.
Transition ID
Your GitLab project can now interact with all Jira projects in your instance and the project now displays a Jira link that opens the Jira project.
When you have configured all settings, click Test settings and save changes.
Test settings and save changes
It should be noted that you can only display issues from a single Jira project within a given GitLab project.
The integration is now activated:
Learn more
More to explore
ENGINEERING ENGINEERING ENGINEERING
How to integrate How to use GitLab for How to use GitLab for
GitLab.com with Jira Agile, CI/CD, GitOps, Agile portfolio planning
Cloud and more and project
Tye Davis management
Name
Mara − ⚑
M ⏲ 9 months ago
Is it possible to make a *Jira issue mandatory on the commits?
Jira issue valid / existent
1 0 • Reply • Share ›
Tim − ⚑
T ⏲ a year ago
Is it just me, or are the screenshots in the article above blurry and unreadable? I can't actually see what they're trying to do.
1 0 • Reply • Share ›
Peder Alm − ⚑
PA ⏲ 2 years ago
Is it possible to see in the Jira issue when a feature branch is merged into main branch? It should be possible, because the commit message into main contains the issue ticket number, but no
information is visible in the Jira issue.
0 0 • Reply • Share ›
Linkin Park − ⚑
LP ⏲ 2 years ago edited
Great post, a good compilation of all the important points from across multiple documentation articles.
A few questions
1. What is the difference between the methods that you listed in this post vs the GitLab for Jira app that was explained in the first post?
2. Can we do something in one which is not supported by the other? I understand that GitLab for Jira app does not yet support GitLab instances that are hosted under relative URL's, but is that the
only use case where the second post is applicable?
Thanks!
0 0 • Reply • Share ›
Subscribe
By subscribing to this newsletter, I consent to GitLab sending me twice-monthly blog
emails in accordance with GitLab's Privacy Statement. I may opt-out at anytime by
clicking "unsubscribe" in the email footer or by visiting our Communications
Preference Center.
Having trouble viewing or submitting this form?
Platform Solutions Resources Company
DevSecOps platform Digital transformation Install About
Security and Quick setup checklists Jobs
Pricing governance Learn Leadership
View plans Automated software Docs Team
delivery
Why Premium? Agile development Blog Handbook
Why Ultimate? Cloud transformation Customer success Investor relations
stories Trust Center
SCM Remote
CI/CD Newsletter
TeamOps Press
DevSecOps Community
Value stream Forum
management
GitOps Events
Enterprise Partners
Small business
Public sector
Education
Financial services
Contact us
Contact an expert
Get help
Customer portal
Status
Terms of use
Privacy statement
Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license
View page source — Edit in Web IDE — please contribute.
© 2023 GitLab B.V.