Skip to main content
System StatusContact Support
VersionOne Community

TeamCity Integration

Overview 

Instructions on how to integrate TeamCity into Continuum.

Connectivity

To configure and test connectivity to TeamCity, see TeamCity setup then return here.

Create or Select a TeamCity Project and Build Configuration

For purposes of testing and running through the tutorial without impacting a valid TeamCity project, it is recommended that you copy an existing Project and/or Build Configuration in TeamCity and use that for the tutorial.

Another option may be to create a new Project and Build Configuration that simply has an Execute Shell build step in it and echo "hello world". This may be enough to start with and finish out later on.

Triggering the Build

Now we will want to trigger the TeamCity build from our pipeline. Return to the Pipeline Definition editor and edit the example stage. Click the Plugins tab then the TeamCity category. Drag the Build function to the right and drop it below the Log step.

In the “Build Configuration ID” box, you will need to put the identifier for the Build Configuration. This is exactly the same as the build configuration name. The easiest way to find out the Build Configuration ID is to go into the TeamCity interface and edit the build configuration. On the edit screen the “Build configuration id” field will appear. This appears to be a combination of the project name and build configuration with an underscore between.

Return to Continuum and the stage editor. Enter the build configuration in the step. If the TeamCity build configuration has parameters, you can enter them in Parameters box in a Json format as follows:

{
    "name1": "value1",
    "name2": "value2"
}

Typical parameters to pass to a build would be a branch name and commit identifier. This could tell the build to check out a specific branch and commit to build from the source repo. This information can be found in the Workspace of the pipeline instance, we will come back to passing variable parameters later.

Leave the other values on the Build step their defaults. Go ahead and make another commit / push to the source repo with the Work Item identifier in the comments. Return to the pipeline instances page and you should see another pipeline instance. Click on this pipeline instance and drill into the phase. You should see a TeamCity instance number. Clicking on this will jump you into the instance log in the TeamCity user interface.

When the TeamCity build completes, either successfully or failure the status will get updated. If the build errors, the pipeline fails. If there was some other failure, such as an error triggering the build, take a look at the Log tab on the left.

If the build is failing, work through it until you have a successful build so that we can move on to the next step in the tutorial.

Go back to Adding in Continuous Integration/Build Process

  • Was this article helpful?