Team City Continuous Integration Configuration

LymeStack can use TeamCity as a Continuous Integration / Continuos (CI/CD) platform. If you don't have Team City installed on your DevOps server, see the DevOps Server Setup Guide. For our documentation we will use the hypothetical project name "MyCompany" to illustrate our examples.

Create a New Project in Team City

The first thing you'll need to do is setup a new project in TeamCity. To do this, log onto your DevOps Server on your remote desktop and navigate to the TeamCity dashboard.

Create a New Project in TeamCity

TODO: Fill this in.

Specify VCS (Git Source Control) configuration.

Define the Build Configuration

Below are the steps used by TeamCity to build the application and deploy to the UAT instance being hosted on IIS on the same machine as the TeamCity build agent. For default beginning use cases, the TeamCity Server, TeamCity Build Agent and UAT IIS Web Server all run on the same server.

Step 1 - NUGET Package Installer

Step 2 - Build API

Step 3 - Create buildnumber.txt File

:: del .\MyCompanyApi\bin\Release\net8.0\win-x64\publish\buildnumber.txt
@echo off
@echo %build.number%> .\MyCompanyApi\bin\Release\net8.0\win-x64\publish\buildnumber.txt

Step 4 - Run Yarn Command

Step 5 - Build Angular App

Step 6 - Update Base HREF in index.html File

Step 7 - Create NuGet Packages

my-company-angular-app\dist-prod\MyCompanyAngularApp.nuspec
MyCompanyApi\MyCompanyApi\bin\Release\net8.0\publish\MyCompanyApi.nuspec
MyCompanyApi\MyCompany.DbUp\bin\Release\net8.0\publish\MyCompany.DbUp.nuspec

Step 9 - Configure Change Log Data Generation

NOTE: You need to change the _baseUrl and _tempCityProjectId in the ChangeLogDataGatherer.cs file. This is not ideal and will be fixed in a future release.

Step 8 - Push Packages to Octopus

Prerequisite: You'll need to configure the deployment process in Octopus prior to completing this step

Step 9 - Create Octpus Release to UAT

Exclude checkins to the .octopus directory from triggering new builds

  1. Go to the MyCompany project page in TeamCity.
  2. Click "Version Control Settings"
  3. Click the "Edit Checkout Rules" option net to the listed VCS Root.
  4. Enter the value -:.octopus
  5. Click "Save"