Jenkins Sites

Jenkins sites are configured in Jira and determine which jobs and builds are synchronized to Jira.

Site Types

There are different types of site that can be added:

Accessible

This is a site that the Jira app can directly connect with to support bidirectional integration between Jira and Jenkins.

Inaccessible

This is a site that the Jira app is not able to connect with for data synchronization, either because of a firewall or other network limitations. This limits the integration to be uni-directional, where Jenkins will push data to the Jira app for processing.

Site Scopes

Jenkins sites can be managed in two scopes:

Global

Jenkins sites configured by a Jira Site Administrator can be used by all projects within the Jira instance. To manage Jenkins global sites, navigate to Settings > Apps > Jenkins Integration > Manage Sites.

Project

Jenkins sites configured by a Jira Project Administrator can be used by the project where the site was configured for. To manage Jenkins project sites, navigate to Project Settings > Jenkins Integration

Add a Site

When on the Manage Sites page, click on the Connect a Site button. This brings up the Connect a Site wizard. Follow the steps in the wizard to create and connect the Site.

Accessible Site

  1. Follow the instructions to install the ‘Jira Integration’ plugin on your Jenkins site.
  2. Click Next.
  3. Provide a Name.
  4. Provide the Site URL.
  5. Select Accessible accessibility.
  6. Click Next. If you don’t want to alter the defaults, click on Save and Connect to jump to step 13.
  7. Optionally, provide a Display URL in case the Site URL is not accessible by users and a different URL should be used in the UI features.
  8. Optionally, as Jira site administrator, provide a Scope in case you want to limit the site integration to a specific Jira project.
  9. Optionally, un-check the Enabled for Synchronization checkbox if you want to connect the site but not enable it for job and build synchronization.
  10. Optionally, un-check the Auto enable new Jobs checkbox if you don’t want to enable all Jobs on the site by default, including future new jobs. You will be required to manually select the jobs you want to synchronize once the site in added and connected.
  11. Optionally, un-check the CSRF Protection checkbox if the Jenkins site doesn’t use CSRF protection.
  12. Click Next
  13. Select you preferred method of registering the Jira site with your Jenkins site.
    • Select Automatic to let the app register itself with Jenkins. You will need to provide Jenkins administrative credentials to use this.
    • Select Manual to use the provided Registration Link 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.
  14. Click Connect to finalise the connection. Alternatively click Connect latest to complete the registration at a later point in time.

Inaccessible Site

  1. Follow the instructions to install the ‘Jira Integration’ plugin on your Jenkins site.
  2. Click Next.
  3. Provide a Name.
  4. Provide the Site URL.
  5. Select Inaccessible accessibility option.
  6. Click Next. If you don’t want to alter the defaults, click on Save and Connect to jump to step 11.
  7. Optionally, as Jira site administrator, provide a Scope in case you want to limit the site integration to a specific Jira project.
  8. Optionally, un-check the Enabled for Synchronization checkbox if you want to connect the site but not enable it for job and build synchronization just yet.
  9. Optionally, un-check the Auto enable new Jobs checkbox if you don’t want to enable all Jobs on the site by default, including future new jobs. You will be required to manually select the jobs you want to synchronize once the site in added and connected.
  10. Click Next
  11. Select you preferred method of registering the Jira site with your Jenkins site.
    • Select Manual to use the provided Registration Link 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.
  12. Click Connect to finalise the connection.

Manage Sites

Edit a Site

To edit the details of a site, like name, authentication details, etc, simply click on the Edit button in the actions column. This will show the Site edit form allowing you to update the details of the Site.

Delete a Site

To delete a Site, simply click the Delete button in the actions column and click the Delete button to delete the site.

Synchronize a Site

To synchronize a Site and all enabled jobs on it, simply click on the Synchronize button in the actions column.

Cleanup Jobs

To clean up job and build data of a site, simply click on the Cleanup Jobs action in the actions dropdown. This will not delete data on Jenkins, but will only delete jobs and builds that are marked as deleted in Jira.

Enabled for Synchronization

To quickly disable or enable an entire site for synchronization, simply click on the Enabled for Synchronization action in the actions dropdown. Alternatively this can also be done using the Site Edit action.

Auto Enable New Jobs

To quickly enable or disable the Auto Enable new Jobs setting for a Site, simply click on the Auto Enable new Jobs action in the actions dropdown. Alternatively this can also be done using the Site Edit action.

Manage Connection

To show the manage connection wizard of a site, simply click on the ‘Manage Connection’ action in the actions dropdown (If your site is behind a firewall then this button is placed top-level action). This information can be used to (re)register the Jira site with Jenkins. And also to configure the integration using the Jenkins Configuration as Code feature.

Manage Jobs

The Manage Jobs site action allows you too quickly perform multiple operations, see Manage Jobs, on multiple jobs, simply click on the Manage Jobs action in the actions dropdown.

Enable/Disable a Job

Each job can be enabled or disabled in the synchronization process. Use the toggle button in front of the job name, or on top of the page, to enable or disable it.

Synchronize a Job

Jobs are automatically synchronized when they trigger a completed build using the Jira Build Notification Listener feature. But this process can be forced for a job by clicking on the Manage button in the actions column, followed by clicking on Synchronize in the actions column of a job.

Clear Build Cache

To remove all the synchronised builds of a Job, simply click on … and select Clear Build Cache

Rebuild Build Cache

To rebuild a build cache of a Job, simply click on … and select Rebuild Build Cache. This will mark all the builds of the selected Job as Deleted, reset the last synchronised build to 0, and will then trigger the synchronisation process for the selected Job.


Previous: Configuration and Features
Next: Jira Sites
Jenkins Integration for Jira DC

Didn’t find what you were looking for?