All Collections
Behave Pro Server and Datacenter
GitLab Integration
Connecting GitLab Repository to a Jira Project
Connecting GitLab Repository to a Jira Project

Connect your Jira project to a GitLab repository via Behave Pro git integration.

Alan Parkinson avatar
Written by Alan Parkinson
Updated over a week ago

Note: GitLab integration is only available in Behave Pro version 2.1.0 and later!

First, you will need to make sure that the GitLab is connected to your Jira instance via the application links. If you have not done this yet, please read the Setting up GitLab for git integration article.

Next, set up the git integration by following the steps below. If you have an existing Jira project that already uses Behave Pro and you want to migrate to git integration, please read the Migrating classic Behave Pro project to git integration article instead.

Setting up for a new Jira project

To set up the git integration access the project settings of your Jira project. Then navigate to the Behave Pro configuration page by clicking on the Behave Pro button on the left navigation menu as seen in the image below.

Next, you will be shown the welcome page. Click "Get Started" at the bottom to continue.

You rill be asked to choose your desired workflow. For the purpose of this tutorial, choose the "git" by clicking on the right button.

Next, you will need to select the correct the correct GitLab group from the top dropdown. If your GitLab instance is not shown in the list, please make sure you have followed all of the necessary steps in the Setting up GitLab for git integration article.

Once you have selected your GitLab group, select the repository from the dropdown below.

To continue, you will need to select the preferred branching strategy. The options are the following:

  • Trunk based - All of your feature files will be stored in a single branch of your choice.

  • Feature branching - Each new feature or scenario added in a Jira issue will create a new branch with the Jira issue summary as the branch name. The specification page will only show the features from the branch of your choice, not from the issue branch.

Next, select your branch and the path where you wish your feature files will be stored in. If the list of branches is empty, this means your repository is empty. Please initialize the repository with the branch you wan to select. Additionally, the path you will choose to store the feature files in must exist.

You can leave the feature file directory empty. In this case, the feature files will be stored in the root folder of your repository. Forward slash at the beginning or end of the directory path is purely optional and has no effect. Backward Windows-like slashes are not allowed.

After clicking the [Continue] button, you will be shown a webhook settings page for GitLab.

When anyone creates, updates, or deletes a feature or a scenario within your Jira project, the changes are pushed to your GitLab project. To enable receiving changes from the GitLab (when someone pushes a commit to your repository with feature changes) you will need to add a webhook with a secret token generated by Behave Pro.

If you wish to skip this step, check the "skip this step" checkbox and click [Finish] button.

Go to your GitLab repository (click the "Visit here to create a webhook" link) and from the left navigation menu, select "Settings" and click "Webhooks". Do not use "Integrations" as they have been deprecated in the newer versions of GitLab.

Create a webhook with the URL and the secret token generated by Behave Pro. Make sure you check the "Push events" checkbox! Without this the synchronization will not work.

After you have created the webhook, send a test payload webhook by clicking on the [Test] dropdown button and selecting "Push events" from the list of payloads. This will send a sample webhook to Behave Pro for Jira. No real synchronization will happen.

After sending the test webhook, you should be notified with the following message.

Finally, go back to the Behave Pro project setup page and click the [Test] button. You will be shown a dialog that will check if the test payload has been successfully received from GitLab. After that, simply click the [Finish] button to complete the setup.

After clicking "Finish" your settings will be saved and you will be redirected back to the Behave Pro settings page as shown below. You can now start using Behave Pro for Jira.

Did this answer your question?