Page tree

TeamCity is a build management and continuous integration server. BMC Release Process Management now supports an integration with TeamCity. BMC provides automation scripts out-of-the-box, which you can import from the from the library and start using directly. You can also modify the existing scripts or create your own scripts.

This topic provides information about the following:

Configuring TeamCity integration

Before you start using automation scripts, you must first create an integration server to connect TeamCity and BMC Release Process Management. 

  1. To create an integration server, go to System > Integrations.
  2. In the right pane, click Create new Integration.
  3. From the Server Type list, select TeamCity.
  4. In the Server Name box, enter a unique name to identify the server for TeamCity.
    For example, BRPM TeamCity.
  5. (Optional) In the Ip box, enter the IP address of the TeamCity server.
  6. In the Server URL box, specify the fully qualified URL to the TeamCity server.

    Note

    You can specify the URL with the port number.

  7. (Optional) In the Port box, enter the port used for TeamCity server.

    Note

    Specify the port number only if not specified as part of the Server URL.

  8. In the Username box, enter the user name required to log on to the TeamCity.
  9. In the Password box, enter the password that matches the user name.

  10. Click Add Server

Importing scripts

After you configure an integration server, import all automation scripts available for TeamCity. 

To import automation scripts:

  1. Go to Environment, click Automation and click Import Scripts from Library
  2. In the Import automation scripts from the library dialog box, perform the following steps:
    1. From the Integration  Server list, select TeamCity. 
    2. To import local ruby script, from the To use  as list, select Local Ruby.
      The Team city run build script is displayed. 
    3. From the Category list, select TeamCity.
    4. Select the local ruby script check box to import a local it into BRPM. 
    5. To import data retriever scripts, from the To use as list, select Data Retriever, select the category as TeamCity and use the check boxes to select the data retriever scripts to import. 
    6. Click Import

 After completing the configurations, you can create a request, add steps to the request, and use the automation script available for TeamCity to perform your tasks. 

Data Retriever Scripts for TeamCity integration

Script nameDescripton
team_city_buildtypes.rbRetrieves the list of build types in a project on the TeamCity server.
team_city_projects.rbRetrieves the list of projects on the TeamCity server.
team_city_projects_tree.rbRetrieves the list of projects on the TeamCity server.

Local ruby scripts for TeamCity integration

Script nameDescripton
Team city run build

Runs the build on the TeamCity server.

Uses the data retriever scripts to retrieve data about the build types and projects on the TeamCity server.

Working with TeamCity scripts

You can use the TeamCity run build script to run builds on the TeamCity server. 

Run builds on the TeamCity server

To run builds on the TeamCity server, you must create a request, and create an automation step with the following attributes. 

  1. From the Requests list, go to the desired request, and click New Step.
  2. Enter the required details in the all the fields and then click the Automation tab.
    For more details, see Add steps to a request.
    Consult the following table to enter details in the Automation tab.

    Automation tab attributesDescription
    Step ActionSelect TeamCity from the list to retrieve local ruby script.
    TaskSelect TeamCityrun build script to be executed in the automation step.
    Automation Timeout (Optional)You can choose to specify a timeout for the automation step.
    TeamCity projectSpecify the name of the project to which the build that you want to run belongs.
    Build typeSpecify the buildtype to which the build that you want to run belongs.
  3. Click Add Step & Continue or Add step & Close.
    After you run this automation step, you can go to the Notes tab of the corresponding step and view the results of the automation step. 

You can add more scripts to integrate with TeamCity that matches your requirements. For information, see Creating automation scripts

Related topics

Integrating

Importing automation scripts from the library

Creating automation scripts

Messaging system support for integrations