4.7 KiB
stage | group | info |
---|---|---|
Ecosystem | Integrations | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments |
Set up a development environment (FREE)
The following are required to install and test the app:
-
A Jira Cloud instance. Atlassian provides free instances for development and testing.
-
A GitLab instance available over the internet. For the app to work, Jira Cloud should be able to connect to the GitLab instance through the internet. For this we recommend using Gitpod or a similar cloud development environment. For more information on using Gitpod with GDK, see the:
- GDK in Gitpod video.
- GDK with Gitpod documentation.
You must not use tunneling tools such as Serveo or
ngrok
. These are security risks, and must not be run on developer laptops.Jira requires all connections to the app host to be over SSL. If you set up your own environment, remember to enable SSL and an appropriate certificate.
Install the app in Jira
To install the app in Jira:
-
Enable Jira development mode to install apps that are not from the Atlassian Marketplace:
- In Jira, navigate to Jira settings > Apps > Manage apps.
- Scroll to the bottom of the Manage apps page and click Settings.
- Select Enable development mode and click Apply.
-
Install the app:
-
In Jira, navigate to Jira settings > Apps > Manage apps.
-
Click Upload app.
-
In the From this URL field, provide a link to the app descriptor. The host and port must point to your GitLab instance.
For example:
https://xxxx.gitpod.io/-/jira_connect/app_descriptor.json
-
Click Upload.
If the install was successful, you should see the GitLab.com for Jira Cloud app under Manage apps. You can also click Getting Started to open the configuration page rendered from your GitLab instance.
Note that any changes to the app descriptor requires you to uninstall then reinstall the app.
-
Troubleshooting
If the app install failed, you might need to delete jira_connect_installations
from your database.
- Open the database console.
- Run
TRUNCATE TABLE jira_connect_installations CASCADE;
.
Not authorized to access the file
If you use Gitpod and you get an error about Jira not being able to access the descriptor file, you might need to make the GDK's port public by following these steps:
- Open your GitLab workspace in Gitpod.
- When the GDK is running, select Ports in the bottom-right corner.
- On the left sidebar, select the port the GDK is listening to (typically
3000
). - If the port is marked as private, select the lock icon to make it public.
Test the GitLab OAuth authentication flow
Introduced in GitLab 14.9 with a flag named
jira_connect_oauth
. Disabled by default.
GitLab for Jira users can authenticate with GitLab using GitLab OAuth.
FLAG:
By default this feature is not available. To make it available,
ask an administrator to enable the feature flag named jira_connect_oauth
.
The feature is not ready for production use.
The following steps describe setting up an environment to test the GitLab OAuth flow:
-
Start a Gitpod session and open the rails console.
bundle exec rails console
-
Enable the feature flag.
Feature.enable(:jira_connect_oauth)
-
On your GitLab instance, go to Admin > Applications.
-
Create a new application with the following settings:
- Name:
Jira Connect
- Redirect URI:
YOUR_GITPOD_INSTANCE/-/jira_connect/oauth_callbacks
- Scopes:
api
- Trusted: No
- Confidential: No
- Name:
-
Copy the Application ID.
-
Go to gitpod.io/variables.
-
Create a new variable named
JIRA_CONNECT_OAUTH_CLIENT_ID
, with a scope of*/*
, and paste the Application ID as the value.
If you already have an active Gitpod instance, use the following command in the Gitpod terminal to set the environment variable:
eval $(gp env -e JIRA_CONNECT_OAUTH_CLIENT_ID=$YOUR_APPLICATION_ID)