« Table of Contents

tracked folder logo Tracked Folders Jira Server Only

Introduced in v2.9.0 of the Git add-on, this feature scans a locally accessible path for cloned Git repositories and automatically imports those Git repository references into Jira.  A repository group called TRACKED FOLDER is added into the Git add-on repository settings.

warning
The Add tracked folder feature requires that Jira and the git servers be on the same filesystem.  Make sure that the user that Jira is running with has access permissions to the path with the git repositories.

Adding Tracked Folders

To add repositories via Tracked Folders:

  1. Go to  cog Administration  > Add-ons  >  Git Integration Plugin for Jira  > Git Repositories.
  2. helpful tip
    If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.
  3. Click the dropdown arrow on Connect to Git Repository then Add tracked folder.
  4. The following dialog is displayed:
  5. Enter the Tracked folder location in the required field then click Scan folder.
  6. For example: /home/ec2-user/repositories/*

    In the following dialog, the wizard will find git repositories stored in the provided path and displays the list of repositories found.

    In the above example repository root, /home/ec2-user/repositories/*, all repositories under this mask (/home/ec2-user/repositores/<repo1>, /home/ec2-user/repositores/<repo2>) will be handled as one entry in the Git Repositories configuration page.  For other features, these are treated as seperate repositories.

    fyi
    The Add tracked folder wizard scans the local path one folder level deep.
  7. Click Import repositories.
  8. The wizard automatically adds the detected repositories to Jira.  If a repository is added to the path, Jira will add it to the index. If a repository is removed from the path, Jira will drop the index for that repository.
  9. On the Permissions dialog, set Repository Browser and Project Association permissions, if required.  Click Next.
  10. Click Finish to complete adding the tracked folder.

The tracked folder is added to the repository configuration list.

helpful tip
You can add multiple tracked folders in case your repositories are spread among multiple locations.

Editing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Edit tracked folder to modify tracked folder git repository settings.

Removing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Delete tracked folder to remove the tracked folder configuration from Jira.

A confirmation dialog will be displayed:

  1. Leave the checkbox unchecked to just remove the tracked folder setting from the repository configuration list. (The local path for this tracked folder will still remain in the local system for later use); or
  2. Tick the checkbox to permanently delete the tracked folder and its files from the local system.

Reset Index

On the Git Repositories settings page, click  cog Actions  > Reset index.

This action will reset the indexes of the repositories for the selected tracked folder.

Viewing Tracked Repositories

On the Git Repositories settings page, click  cog Actions  > Show tracked repositories.

This action will open the Tracked Folder dialog showing the tracked repositories.

note
The Repository Browser will not display the repository if it is disabled in the Git Repositories configuration. The commits and code diffs in the Issue > Git Commits, Git Roll Up and Project tabs will also be unavailable due to this.

Reindexing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Reindex tracked folder.

This action will perform a reindex of the selected tracked folder.

fyi
If a new repository is manually added into the local path, the Git add-on will detect the new repository folder on the next reindex and add it into the existing tracked folder in Jira.
note
If a repository folder is manually deleted from the local path, the Git add-on will remove the repository setting from the tracked folder in Jira on the next reindex.
Jira Administrators

It is possible to track all repositories hosted on a GitLab server from inside a Jira server.  Setup NFS server on the GitLab computer and mount GitLab repositories folder as a remote NFS folder on Jira server.  Configure NFS permissions to allow Jira to access GitLab folders by using either of the two possible solutions:

Solution 1.

The 'all_squash' option must not be used in the NFS server 'etc/exports' file for GitLab folders.  The NFS client should have the 'git' group with the same GID as the 'git' group on the NFS server.  The Jira user on the NFS client should be added to the group 'git'.

Example of '/etc/exports' line:
/var/opt/gitlab/git-data/repositories/testrepo xx.xx.xx.xx/24(ro,root_squash,async)

Solution 2.

Use the 'all_squash,async,anonuid=$uid,anongid=$gid' option on NFS server, where $uid and $gid are user ID and group ID for 'git' user and 'git' group respectively (or another user/group which you are using to access GitLab repositories on GitLab server).

Example of '/etc/exports' line:
/var/opt/gitlab/git-data/repositories/testrepo xx.xx.xx.xx/24(ro,all_squash,async,anonuid=497,anongid=497)

In both cases either 'ro' or 'rw' options may be used on NFS server.

 

« Table of Contents