You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

In today's software development landscape, collaboration and efficient project management are paramount for teams aiming to deliver high-quality products. Two popular tools that streamline these processes are Jira and GitLab. Jira, a project management tool, offers many features to plan, track, and manage projects. In contrast, GitLab, a robust source code management platform, empowers developers to collaborate on code repositories seamlessly. Combining the power of Jira and GitLab can significantly enhance productivity and enable smooth project execution.

To showcase said integration, two projects were created on Jira and Gitlab

https://gitlab.eufus.psnc.pl/ach/gitlab-jira-integration-example

https://jira.eufus.psnc.pl/projects/GJIE

The basics

Each time one creates a Jira project, one must enter the project key. The project key is the tag that we can use in GitLab to reference Jira issues.

For example, the newly created project My Personal Project has the tag MPP. You create your first Jira issue. This Jira issue will have a reference MPP-1. This issue reference can be added in a commit message, merge request title, or a simple comment inside the Gitlab issue.

Jira will look for tags in repositories that are added in DVCS. If you tag MPP-1 inside GitLab and it doesn't show up in Jira, please contact bpogodzinski@man.poznan.pl or dfigat@man.poznan.pl and we will add your repository.

Example

We start by creating our first Jira issue

Our issue is tagged GJIE-1. We now can use this tag inside Gitlab to reference comments and merge requests and branches.

Let's double-check if our Gitlab repository at https://gitlab.eufus.psnc.pl/ach/gitlab-jira-integration-example is visible to Jira. Go to project settings and look for development tools

As you can see ACH, which is a group containing our project, is there. Everything is set up.

Let's create a branch that we will tag.

After branch creation, you can see in Jira that 1 branch is related to this issue

 

Let's now make a new commit to fill the README.md file

git clone git@gitlab.eufus.psnc.pl:ach/gitlab-jira-integration-example.git
cd gitlab-jira-integration-example
git checkout GJIE-1-add-readme
echo "# Gitlab Jira Integration Example" > README.md
git add README.md
git commit -m 'GJIE-1 Add README.md'
git push

After this, our Jira issue is updated

Finally, let's create a merge request. You can create it via the Jira user interface or by creating a merge request in GitLab and tagging it accordingly.

We can see now that the merge request is linked to the Jira issue.

You can also insert issue tags inside comments in GitLab issues. Be mindful that Jira issues and Gitlab issues are not synchronized together. This means the issue created on Gitlab will not show up in Jira and vice versa.

This concludes the Gitlab - Jira integration tutorial.







  • No labels