This page explains

Checking Environment

Before installing the plugin make sure that you're using:

First, you will need to configure your TeamCity instance:

  1. Make sure that Rest API Plugin is enabled. To do that go to the following URL: <your-teamcity-server>/httpAuth/app/rest/application.wadl. You should see the output as shown below
  2. Configure integration with JIRA as described here

    If you want to provide TeamCity with access to all JIRA projects, click the Get All Projects link in the window Create New Issue Tracker Connection. Otherwise, specify the projects you want to grant access to in the Project Keys field as shown below. The JIRA user specified in the Username field should have access to relevant JIRA projects.

  3. Assign the  Project Viewer  and  Agent Manager  roles to an existing TeamCity user
     or 
    first create a new user and assign the roles.  

Installing the Add-on

When you're finished with the steps above, switch to JIRA and do the following:

  1. Install the plugin with Universal Plugin Manager  or  manually.
  2. Install the plugin license:

Creating the Application Link (JIRA under 6.1)

  1. Create the TeamCity Application Link as described here.  

    You don't need to create a link for every project. One Application Link will be enough. 

      

    You will see your link in the Application Links list. 
  2. Configure Basic HTTP Authentication for Outgoing Authentication as described here. Use the credentials of the TeamCity user you configured earlier. These credentials will be used by the Application Link. 
       
  3. Give the View Issue Source Tab permission to eligible users.

Creating the Application Link (JIRA 6.1 and later)

1. Navigate to JIRA > Administration > Add-ons.

2. Open the Application Links section.

3. Enter address of TeamCity instance and click Create new link.

If you see the form with notification about invalid URL address, just skip it by clicking Continue.

4. After verification of TeamCity instance, the Link Applications form is displayed. 

5. In the Link Applications form, specify the following information:

6. Leave all the other parameters without any changes.

7. Click Continue.

8. A new application link will appear on the list with available application links.

9. Click the Edit link to modify access parameters.

10. In the opened Configure Parameters form, switch to Outgoing Authentication.

11. Here enter credentials of TeamCity account with assigned Project Viewer and Agent Manager roles.

12. Click Enable.

13. Close the form.

How to See TeamCity Builds

Immediately after installation, the plugin displays the TeamCity tab on the Project, Version and Issue pages in JIRA and starts indexing all TeamCity builds looking for those containing JIRA Issue Keys.

Issue Key  is a JIRA issue ID. Normally, it's specified in a commit log message in a version control system integrated with TeamCity. For example, a developer commits a source code file adding the log message DEMO-5 Added compatibility with older browser versions,  the build that includes this change will be shown in JIRA in the DEMO project and in issue DEMO-5. 

While the plugin is analyzing the builds, you will see the the following message on the TeamCity tab.

 

This process may take a while on large instances. Also, please see #5 here.

 When the initial indexing is over, you will see all found builds on the TeamCity tab on the Project (shown below), Version and Issue pages.

If no relevant builds are found, you will see the message No associated builds are found From now on, the plugin will update the build list in JIRA every 2 minutes.

Each issue in JIRA is assigned to a project and (optionally) to a version, therefore a build list displayed on the Project tab is compiled of the issues assigned to a given project, and a build list displayed on the Version tab is compiled of the issues assigned to a given version.

The TeamCity tab looks the same for issues, projects and versions. It contains the main build parameters, such as a start date, build duration, commit log, etc., and allows you to switch to TeamCity for detailed information.

How to Add the TeamCity Agents Gadget

The TeamCity Agents gadget shows whether the TeamCity agents are connected and enabled. You can add this gadget to your JIRA dashboard to have this information handy. If you're using the system dashboard which is displayed by default, you will need to create a custom dashboard and add the TeamCity Agents gadget.

You will see the gadget on your dashboard as shown below.