Skip to main content

Version: 23.10

TeamCity CI Example

TeamCity is a popular CI tool for automating tasks related to building, testing and deploying software.

Journey SDK Dependency

In order to build the Home Loan application, it needs to declare a dependency to Journey SDK libraries. There are several approaches you can choose from.

  • Option 1 (Recommended) Unzip the SDK on your file system and use Ant's -lib option to point to the folder with the libraries; for example, ant -lib "SDK_HOME/lib". In TeamCity you can add the SDK_HOME variable to your build configuration.


  • Option 2 Add SDK libraries to the project structure, and then use Ant's -lib option to point to the folder containing the libraries.

  • Option 3 Add the SDK libraries in the Ant lib folder.

  • Option 4 Add all the libraries on the CLASSPATH environment variable.

The following example assumes you have selected the recommended approach (Option 1) and, therefore, the SDK is unpacked somewhere on your file system.

Home Loan Example

Project builds are handled via jobs in TeamCity. Follow these steps to setup a TeamCity CI job for the Home Loan application.


In this example, we refer to the SDK_HOME environment variable using the Windows syntax $SDK_HOME.

On a Unix-based system, use %SDK_HOME% instead.

  1. Click Administration, then click Create project.


  2. Configure how to retrieve the source code; that is, checkout the Application Package (Forms, Functions, Tests). For example, if you're using Git, enter the URL to the Git repository. If the repository is not public, you may also need to configure the credentials. Finally, click Proceed.


  3. Enter a project name and build configuration name, then click Proceed.


  4. TeamCity suggests a build step if a build file is detected. Select the 'Ant' build step and click Use selected.


  5. If you need to modify the auto-detected 'Ant' build step, click Edit.


    TeamCity also provides options to add more build steps and to repeat the auto-detect step.

  6. Add 'app-test' to the target in order to execute any local unit tests and build the Application Package.


  7. If you want to deploy to a Journey Manager (JM) server, add 'app-deploy' to the target and set the JM server endpoint properties.


  8. Add and configure build triggers, such as Branch Remote Run Trigger, as necessary.


  9. Enter details of the artifacts that you want to keep when the job is complete; for example, the application package zip file.


  10. Click Run to start the job.


    You can view the build log when the job is complete. A sample build log is shown below.

Sample Build Log

Here is a sample of the logged output from a successful build, test and deployment of the application package.

[12:52:46]The build is removed from the queue to be prepared for the start
[12:52:46]Collecting changes in 1 VCS root (1s)
[12:52:47]Starting the build on the agent ...
[12:52:49]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[12:52:49]Publishing internal artifacts
[12:52:49]Using vcs information from agent file: ceb8084f070a40fc.xml
[12:52:49]Checkout directory: C:\TeamCity\buildAgent\work\ceb8084f070a40fc
[12:52:49]Updating sources: auto checkout (on server)
[12:52:49]Step 1/1: Application Package Test And Deploy (Ant) (19s)
[12:52:49][Step 1/1] Starting: C:\eclipse-git\workspace\jdk\jdk1.8.0_152\bin\java.exe -Dagent.home.dir=C:\TeamCity\buildAgent -Dagent.ownPort=9090\TeamCity\buildAgent\work -Dant.home=C:\utils\apache-ant-1.10.1 -Dbuild.number=6 -Dbuild.vcs.number=fc9cfa105c5adb303ddef7d98008d47c5cda4843 -Dbuild.vcs.number.1=fc9cfa105c5adb303ddef7d98008d47c5cda4843 -Dbuild.vcs.number.HomeLoanCi_105c5adb303ddef7d98008d47c5cda4843\TeamCity\buildAgent\temp\buildTmp -Dteamcity.agent.cpuBenchmark=520 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=6 -Dteamcity.auth.password=******* -Dteamcity.auth.userId=TeamCityBuildId=6\TeamCity\buildAgent\temp\buildTmp\changedFiles7786677019235352563.txt\TeamCity\buildAgent\work\ceb8084f070a40fc\TeamCity\buildAgent\temp\buildTmp\\TeamCity\buildAgent\temp\buildTmp\TeamCity\buildAgent\work\ceb8084f070a40fc "-Dteamcity.buildConfName=Home Loan CI Build Configuration"\TeamCity\buildAgent\temp\buildTmp\ -Dteamcity.dotnet.nunitaddin=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe "-Dteamcity.projectName=Home Loan CI"\TeamCity\buildAgent\temp\buildTmp\ -Dteamcity.runtime.props.file=C:\TeamCity\buildAgent\temp\agentTmp\ant1977622259571025473runtime -Dteamcity.tests.recentlyFailedTests.file=C:\TeamCity\buildAgent\temp\buildTmp\testsToRunFirst4003191390246121507.txt "-Dteamcity.version=2017.2.1 (build 50732)" -classpath C:\utils\apache-ant-1.10.1\lib\ant-launcher.jar -Dmanager.url= -Dmanager.username=username -Dmanager.password=TopSecret -Dmanager.clientCode=maguire -lib C:/TeamCity/buildAgent/plugins/antPlugin/ant-runtime.jar;C:/TeamCity/buildAgent/lib/runtime-util.jar;C:/TeamCity/buildAgent/lib/serviceMessages.jar -listener jetbrains.buildServer.agent.ant.TeamCityAntBuildListener -buildfile C:\TeamCity\buildAgent\work\ceb8084f070a40fc\build.xml -lib C:\transact-sdk-18.5.0\lib app-deploy
[12:52:49][Step 1/1] in directory: C:\TeamCity\buildAgent\work\ceb8084f070a40fc
[12:52:51][Step 1/1] svc-imports
[12:52:51][Step 1/1] svc-typecheck (2s)
[12:52:54][Step 1/1] clean
[12:52:54][Step 1/1] svc-package
[12:52:54][Step 1/1] svc-test (4s)
[12:52:58][Step 1/1] app-package
[12:52:58][Step 1/1] app-deploy (9s)
[12:52:58][app-deploy] app-deploy (9s)
[12:52:58][app-deploy] Http client: created.
[12:52:59][app-deploy] Request: POST HTTP/1.1
[12:53:08][app-deploy] Response: HTTP/1.1 200 OK
[app-deploy] Response: {
"archiveName": "",
"importMessage": "Application package named 'Home Loan' for organization 'maguire' was imported.",
"importStatus": "Completed",
"importTime": "2018-01-12T12:53+1100"
[12:53:08][Step 1/1] Process exited with code 0
[12:53:08]Publishing internal artifacts
[12:53:08]Build finished