TeamCity

Contains actions to get artifacts and trigger builds in TeamCity.

  • About
  • Details
  • Release Notes
  • Installation

Scale beyond simple build and deploy

Expand and standardize your process by joining Continuous Integration with Application Release Automation for a well-defined DevOps toolchain.

BuildMaster integrates with Jenkins

Operations

By installing the TeamCity extension in BuildMaster, you are provided with built-in TeamCity deployment plan operations. These include:

  • Importing an artifact from TeamCity - Downloads an artifact from the specified TeamCity server and saves it to the artifact library
  • Queue a TeamCity Build - Queues a build in TeamCity, optionally waiting for its completion

Using the TeamCity Extension

The steps below will provide a basic example of the value added through the TeamCity extension. In this example we'll be creating a build in TeamCity, pulling that build artifact into BuildMaster, and then promoting it through a simple pipeline.

The TeamCity instance we're using has been configured to create builds of a simple web application called Accounts ; it creates an artifact called Website.zip. We've set the Project name to Accounts > Build Accounts.

Step 1: Install and Configure the BuildMaster TeamCity Extension

Click Administration > Click BuildMaster Extensions > Click TeamCity > Click Install this Extension

After the extension is installed, BuildMaster will automatically restart and TeamCity will now be under Up-to-Date Extensions.

Click Resource Credentials > Create Credential > TeamCity

Enter a Credential name, the Team City server URL, and a credential and save.

Step 2: Create an Application in BuildMaster

Click Applications > Click Create Application > Set Name to Accounts > Click Create

When creating the application, the Integration, Testing, and Production environments will be added by default as the initial pipeline.

Step 3: Create an Import Plan

We first need to import an artifact from TeamCity. For that we'll create a Plan that will queue a build in TeamCity from BuildMaster and import the artifact from the queued build.

Create a new plan and call it Import Build.

Start with a General Block to describe what will be happening in this plan

Add Queue TeamCity Build to the plan and set the Project name and the Build configuration. Also, under the Connection/Identity section add the credential we created earlier.

Add Import TeamCity Artifact next. Add the resource credential as well as the Artifact name, the Project name, and the Build configuration. We'll use lastSuccessful to ensure we don't import a broken build.

Visual Mode

>

Text Mode (OtterScript)

Step 4: Edit Application Pipeline and Set Import Plan

When we created the application, a simple pipeline was also created which we can now edit.

Click Pipelines > Click Accounts

You'll see that our three stages are already in place, and they already have Deploy Accounts plan assigned to them. First, we need to import the TeamCity artifact. We'll create a new Stage for that.

Click Add Stage > Set Name to Import > Set Pipeline position to 0 > Click Save Stage

By setting the Pipeline position to 0, the stage is created as the first stage in the pipeline, since we need to import a build before we can move it through our pipeline.

Next we need to set the import stage with our import plan. Click add target on the import stage and set the plan to Import Build.

Step 5: Edit the Deployment Plan

As noted above, we already have a plan assigned to our pipeline stages called Deploy Accounts; we'll now edit that plan.

Click Plans > Click Deploy Accounts

BuildMaster has automatically created a simple deployment plan by default. The plan doesn't do much, but we can edit it so that it will deploy the artifact that we'll import through the pipeline.

Edit the General Block at the top with a short description of what the plan will do, and set a server for the plan to be run on. Note that you can also target environments and servers to execute operations on from the pipeline stage, but for this tutorial, we'll just set it here.

The other two actions in the plan can be deleted.

Next, drag a Deploy Artifact operation into the edited General Block. Set the Artifact name to Websites, and the Target directory to C:\Websites\$EnvironmentName\Accounts. Using $EnvironmentName will create a new folder for each environment that the application is deployed to, and demonstrates one way to generalize a deployment plan for use in multiple environments.

Step 6: Creating a Release and Deploying

We can now create a Release that deploys the build artifact we created with a release package. The release number can be anything, but defaults to 0.0.0.

Click Releases > Click Create Release

Once the release is created, you can now create a package, which will use the import plan we defined.

Click Create Package > Click Create Package

BuildMaster will now run the Import Plan we created to queue a TeamCity Build and then Import the artifact to BuildMaster.

We can see that there has been an artifact created called website.zip, and the Variable $TeamCityBuildNumber has incremented by 1 from the first screenshot.

You can now run the artifact through the rest of the pipeline simply by clicking [Deploy] in each successive stage. Of course, you can also configure gates, listeners, permissions to ensure that a proper process is followed.

You can further verify that the deployment was successful by checking the drive used when setting up the deployment plan. There will be three folders under /Websites -one for Integration, Testing, and Production- all with the deployed files.

5.4.7

10/3/2017

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.6

9/15/2017

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.5

8/3/2017

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.4

5/2/2017

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.3

4/4/2017

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.2

10/21/2016
  • 25 - FIX: Error trying to queue build for default branch

Download (requires BuildMaster 5.4.0 or newer)

5.4.1

9/30/2016

No notes for this release

Download (requires BuildMaster 5.4.0 or newer)

5.4.0

9/23/2016
  • 26 - BuildMaster 5.4 Changes and TeamCity Build Number Dynamic Variable

Download (requires BuildMaster 5.4.0 or newer)

5.2.1

8/11/2016

No notes for this release

Download (requires BuildMaster 5.2.0 or newer)

5.2.0

7/11/2016

No notes for this release

Download (requires BuildMaster 5.2.0 or newer)

5.1.0

6/17/2016

No notes for this release

Download (requires BuildMaster 5.1.0 or newer)

5.0.1

6/14/2016

No notes for this release

Download (requires BuildMaster 5.0.0 or newer)

5.0.0

4/29/2016

No notes for this release

Download (requires BuildMaster 5.0.0 or newer)

4.8

1/26/2016
  • 17 - Temp file is not deleted from disk after importing build artifact

Download (requires BuildMaster 4.9.5 or newer)

4.7

1/11/2016

No notes for this release

Download (requires BuildMaster 4.9.5 or newer)

4.6

7/16/2015
  • 15 - Extension configuration dropdown does not change context on editor when a non-default option is selected
  • 14 - Importer should not assume that all non-integer values for a build number represent a special build number like "lastSuccessful"

Download (requires BuildMaster 4.4.1 or newer)

4.5

6/26/2015
  • 3 - Support for branches in build action

Download (requires BuildMaster 4.4.1 or newer)

4.4

2/19/2015
  • 11 - Enforce Build Configuration ID when creating a Build Importer Template
  • 10 - Support for TeamCity variables in artifact names

Download (requires BuildMaster 4.4.1 or newer)

4.3

8/8/2014
  • 9 - Implement build import capability for TeamCity
  • 5 - Set BuildMaster releaseNumber and buildNumber from TeamCity
  • 4 - Keep track of TeamCity build number for a release

Download (requires BuildMaster 4.4.1 or newer)

4.2

11/21/2013
  • 1 - Update for 4.0.7 compatibility and fix new styled dropdowns

Download (requires BuildMaster 4.0.7 or newer)

4.1

10/12/2013

No notes for this release

Download (requires BuildMaster 4.0.3 or newer)

4.0

10/7/2013

No notes for this release

Download (requires BuildMaster 4.0.2 or newer)

3.1

1/18/2013

No notes for this release

Download (requires BuildMaster 3.5.0 or newer)

3.0

8/1/2012
  • BMXTEAMCITY-1 - Create a Trigger Build action and a Get Artifact action

Download (requires BuildMaster 3.2.0 or newer)

If your installation of BuildMaster can access inedo.com, simply navigate to Admin > Extensions, and install or update extensions from the gallery.

You can also manually install the extension.

  1. Copy the extension file (TeamCity.bmx) to the Extension Library path (by default, this is c:\BuildMaster\Extensions).
  2. Restart the BuildMaster Service (Admin > Service).
  3. Restart the BuildMaster Web Application (Admin > All Settings > Save).
  4. Verify that the new extension has been loaded (Admin > Extensions)