jira_development_panel.md 6,4 КБ
Newer Older
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
1
# GitLab Jira development panel integration **(PREMIUM)**
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

> [Introduced][ee-2381] in [GitLab Premium][eep] 10.0.

Complementary to our [existing Jira][existing-jira] project integration, you're now able to integrate
GitLab projects with [Jira Development Panel][jira-development-panel]. Both can be used
simultaneously. This works with self-hosted GitLab or GitLab.com integrated with self-hosted Jira
or cloud Jira.

By doing this you can easily access related GitLab merge requests, branches, and commits directly from a Jira issue.

This integration connects all GitLab projects within a top-level group or a personal namespace to projects in the Jira instance.
A top-level GitLab group is one that does not have any parent group itself. All the projects of that top-level group,
as well as projects of the top-level group's subgroups nesting down, are connected. Alternatively, you can specify
a GitLab personal namespace in the Jira configuration, which will then connect the projects in that personal namespace to Jira.

NOTE: **Note**:
Note this is different from the [existing Jira][existing-jira] project integration, where the mapping
is one GitLab project to the entire Jira instance.

We recommend that a GitLab group admin
or instance admin (in the case of self-hosted GitLab) set up the integration,
in order to simplify administration.

TIP: **Tip:**
Create and use a single-purpose "jira" user in GitLab, so that removing
regular users won't impact your integration.

## Requirements

### Self-hosted GitLab

If you are using self-hosted GitLab, make sure your GitLab instance is accessible by Jira.

- If you are connecting to Jira Cloud, make sure your instance is accessible via the internet.
- If you are using Jira Server, make sure your instance is accessible however your network is set up.

### GitLab.com

There are no special requirements if you are using GitLab.com.

## GitLab Configuration

1. In GitLab, create a new application in order to allow Jira to connect with your GitLab account

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
46
47
48
   While logged-in, go to `Settings -> Applications`. (Click your profile avatar at
   the top right, choose `Settings`, and then navigate to `Applications` from the left
   navigation menu.) Use the form to create a new application.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
49

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
50
   Enter a useful name for the `Name` field.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
51

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
52
53
54
   For the `Redirect URI` field, enter `https://<your-gitlab-instance-domain>/login/oauth/callback`,
   replacing `<your-gitlab-instance-domain>` appropriately. So for example, if you are using GitLab.com,
   this would be `https://gitlab.com/login/oauth/callback`.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
55

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
56
57
   NOTE: **Note**:
   If using a GitLab version earlier than 11.3 the `Redirect URI` value should be `https://<your-gitlab-instance-domain>/-/jira/login/oauth/callback`.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
58

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
59
60
61
   ![GitLab Application setup](img/jira_dev_panel_gl_setup_1.png)

   - Check `api` in the Scopes section.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
62

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
63
1. Click `Save application`. You will see the generated 'Application Id' and 'Secret' values.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
64
   Copy these values that you will use on the Jira configuration side.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
65
66
67
68

## Jira Configuration

1. In Jira, from the gear menu at the top right, go to `Applications`. Navigate to `DVCS accounts`
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
69
70
   from the left navigation menu. Click `Link GitHub account` to start creating a new integration.
   (We are pretending to be GitHub in this integration until there is further platform support from Jira.)
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
71

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
72
   ![Jira DVCS from Dashboard](img/jira_dev_panel_jira_setup_1.png)
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
73

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
74
1. Complete the form
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
75

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
76
   Select GitHub Enterprise for the `Host` field.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
77

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
78
79
   For the `Team or User Account` field, enter the relative path of a top-level GitLab group that you have access to,
   or the relative path of your personal namespace.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
80

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
81
   ![Creation of Jira DVCS integration](img/jira_dev_panel_jira_setup_2.png)
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
82

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
83
84
85
   For the `Host URL` field, enter `https://<your-gitlab-instance-domain>/`,
   replacing `<your-gitlab-instance-domain>` appropriately. So for example, if you are using GitLab.com,
   this would be `https://gitlab.com/`.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
86

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
87
88
   NOTE: **Note**:
   If using a GitLab version earlier than 11.3 the `Host URL` value should be `https://<your-gitlab-instance-domain>/-/jira`
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
89

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
90
   For the `Client ID` field, use the `Application ID` value from the previous section.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
91

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
92
   For the `Client Secret` field, use the `Secret` value from the previous section.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
93

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
94
   Ensure that the rest of the checkboxes are checked.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
95

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
96
1. Click `Add` to complete and create the integration.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
97

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
98
99
100
   Jira takes up to a few minutes to know about (import behind the scenes) all the commits and branches
   for all the projects in the GitLab group you specified in the previous step. These are refreshed
   every 60 minutes.
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
101

Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
102
103
104
105
106
107
   > **Note:**
   > In the future, we plan on implementating real-time integration. If you need
   > to refresh the data manually, you can do this from the `Applications -> DVCS
   > accounts` screen where you initially set up the integration:
   >
   > ![Refresh GitLab information in Jira](img/jira_dev_panel_manual_refresh.png)
Marcel Amirault's avatar
Marcel Amirault включено в состав коммита
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

To connect additional GitLab projects from other GitLab top-level groups (or personal namespaces), repeat the above
steps with additional Jira DVCS accounts.

You may now refer any Jira issue by its ID in branch names, commit messages and  merge request names on GitLab's side,
and you will be able to see the linked `branches`, `commits`, and `merge requests` when entering a Jira issue
(inside the Jira issue, merge requests will be called "pull requests").

![Branch, Commit and Pull Requests links on Jira issue](img/jira_dev_panel_jira_setup_3.png)

Click the links to see your GitLab repository data.

![GitLab commits details on a Jira issue](img/jira_dev_panel_jira_setup_4.png)

![GitLab merge requests details on a Jira issue](img/jira_dev_panel_jira_setup_5.png)

## Limitations

- This integration is currently not supported on GitLab instances under a [relative url][relative-url] (e.g. `http://example.com/gitlab`).

## Changelog

### 11.10

- [Instance admins can now setup integration for all namespaces](https://gitlab.com/gitlab-org/gitlab-ee/issues/8902)

### 11.1

- [Support GitLab subgroups in Jira development panel](https://gitlab.com/gitlab-org/gitlab-ee/issues/3561)

[existing-jira]: ../user/project/integrations/jira.md
[jira-development-panel]: https://confluence.atlassian.com/adminjiraserver070/integrating-with-development-tools-776637096.html#Integratingwithdevelopmenttools-Developmentpanelonissues
[eep]: https://about.gitlab.com/pricing/
[ee-2381]: https://gitlab.com/gitlab-org/gitlab-ee/issues/2381
[relative-url]: https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab