Here are the initial steps you need to follow in order to get Jenkins Integration for Jira up and running.
Install the Jira app from the Atlassian Marketplace
You need to download the app Jenkins Integration for Jira from the Atlassian Marketplace.
Go to Jenkins Integration for Jira on the Atlassian Marketplace.
On top right corner of menu bar select your headshot/icon → scroll down to Atlassian Marketplace → click on Atlassian Marketplace.
You will arrive on the Atlassian Marketplace main page. Search ‘Jenkins integration’ and click enter/return:
The first result should be Jenkins Integration for Jira. Click the button ‘Free trial’:
Click ‘Accept & Install’ to start installation:
The app normally downloads within one minute but could be longer depending on your Jira configuration:
Now you need to get the trial license. Click ‘Get license’:
Note: The app will not work until you have the license activated in your Jira instance.
Getting and applying a license
You will arrive at a page with the license key. If you have configured your Jira to connect with the Atlassian Marketplace click ‘Apply License’:
You should have the app installed. Go to Step 3: Installing the Jenkins Plugin. If not keep reading.
If you have not configured your Jira to connect with the Atlassian Marketplace you will see this:
You must manually apply the license. Jenkins Integration for Jira will not work until this is done.
How to manually apply the license
Click ‘Close’ on modal dialog window (the popup that says Oh no!). You will see the installed apps on the Manage Apps page.
Go to my.altassian.com in a new browser window (make sure you are logged in).
Scroll down on the page to see licences. Check ‘Trials’ box if not checked.
Expand ‘Jenkins Integration for Jira: Trial’. Copy the license from the ’license key’ field:
Go back to the Atlassian Marketplace → Manage Apps. Click on Jenkins Integration for Jira Server and Data Center to expand it.
Paste the license key into the field ‘License key’.
Click ‘Update’ to save the license key.
Installing the Jenkins plugin
You also need to download a plugin on the Jenkins side called Jira Integration. It is required.
Go to your Jenkins homepage
Manage Jenkins > Manage Plugins
Under Manage Plugin
Click on the Available Plugins.
Search for jira integration and check the ‘Install’ checkbox
Click ‘Download now and install after restart‘
Check ‘Restart Jenkins when installation is complete and no jobs are running‘ to restart Jenkins.
Connecting Jira and Jenkins
Now you are ready to configure your first Jenkins site (an instance of Jenkins) and enable jobs to synchronize. This is important to do right away as it establishes the data connection between Jira and Jenkins. If you do not do this you will not get any Jenkins data in Jira.
From the top navigation in Jira, choose Gear Icon > Manage Apps
Choose Jenkins Integration > Manage Sites and then click Connect your first Jenkins Site
This brings up the Connect a Site wizard. Create a name of the site you are adding, and provide the site URL.
Under Accessibility select either Accessible or Inaccessible
If select Accessible:
Note the following if select Public:
- In case you use SSL, make sure that Jira and Jenkins have each other SSL certificate in their trust store so that they can connect. See also Connecting to SSL Services.
- The Jenkins counterpart plug-in is required to be installed before the site can be added on Jira.
If select Inaccessible:
Select this option if the Jira app can’t access the Jenkins site directly.
Click Save and Connect to accept connection defaults and connect the site. See Jenkins Sites for the all the details and defaults.
Under Connect Site select the method for connecting the Jenkins site
- Select Automatic to let the app register itself with Jenkins. You will need to provide Jenkins administrative credentials to use this. (Only available for Accessible Sites)
- Select Manual to use the provided Registration Secret and Token to manually register the Jira site in Jenkins.
- Select Configuration as Code to use the Jenkins Configuration as Code feature to register the Jira site through configuration code.
Click Connect to finalise the connection.
We strongly recommend you read about how data synchronization works and how builds are linked to issues. It is also recommended to read about the other options available when connecting a site.