Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

This feature is available for Jira Server only.

On this page:

Table of Contents

Starting from version 2.4.0 TeamCity 0, TeamCity Integration for JIRA Jira add-on allows you to manage the TeamCity Build Runner custom field track the build number for fixed issues. It allows you to remotely run builds on TeamCity server from JIRAdefine the build that fixes the issue or adds the feature reported in the Jira issue.

Before proceeding to configuration of this custom field, please refer to the documentation about management of custom fields in JIRAJira.

Adding a Custom Field

  1. Navigate to JIRA Administration > Issues > Fields > Custom Fields.
  2. Click Add Custom Field.
  3. In the Select a Field Type form, switch to view all custom fields and enter 'TeamCity' into the search field.
    Image Added
  4. Select TeamCity Fixed in Build Runner field field.
  5. Click Next.
  6. Specify the field name and its description.
  7. Click Create.
  8. Select the screens where you want to display this field.
  9. Save the configuration.

Configuring the Custom Field

  1. Locate the newly added custom field and click the cogwheel button.
    Image Added
  2. Click Configure.
  3. On the opened page, click Edit Default Value.
    Select the appropriate TeamCity server, project and build configuration. You can also add an optional comment and define the build parameters.
  4. Click Set Default.

Once you have configured and added the custom field, you can remotely run builds in TeamCity from JIRA.

Adding Build Parameters into Custom Field Configuration

You can add one or multiple build parameters into configuration of the custom field.

For example, if you want to add one parameter with the value so you have to specify the following:

 

Code Block
languagepowershell
teamcity.build.branch=your_vcs_branch_name
# This build parameter defines which branch to choose for build creation. It may look like: teamcity.build.branch=2.2.0

...

Code Block
languagepowershell
teamcity.agent.name=Windows2012R2;teamcity.build.branch=2.2.0

  1. Image Added
  2. Here define the parameters for population of the Fixed in build field with the relevant builds, as follows:
    1. Selection Criteria - choose the appropriate way of selecting builds, as follows:
      1. Single build (one against multiple build configurations).
      2. Multiple builds (one against each build configuration).
    2. Build Tracking - select the appropriate option for populating the Fixed in Build field, as follows:
      1. Most recent build (successful or failed) - the add-on populates the field automatically with the number of the recent successful or failed build.
      2. Most recent successful build - the add-on populates the field automatically with the number of the recent successful build number.
      3. First successful build - the add-on populates the field automatically with the number of the first successful build.
      4. First build (successful or failed) - the add-on populates the field automatically with the number of the first successful or failed build.
      5. Manual - the user can select the appropriate build number.The build number is not assigned automatically if using this option.
  3. Add one or multiple builds configurations for the field population.
    Image Added
  4. .Click Set Default.

Once you have configured and added the custom field, you can get the field populated with the number of the build that fixes the issue or adds the requested feature.

To delete the no longer used build configuration, click the Delete Image Added icon

...