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, 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 merge request is linked with the Jira issue. This concludes the Gitlab - Jira integration tutorial.