Subversion and Team City Integration 

Tuesday, January 25, 2011 4:33:00 PM

In this article we would like to show you how the Budget in Brief application was integrated into the real Enterprise Environment.

Two main components of this enterprise environment are: 

  •  Subversion is the open source Version Control System (VCS), that is used to manage content across the organization, and the
  •  Team City is the Distributed Build Management and Continuous Integration Server (CIS), that is used to fully automate business process life cycle.  


The Budget In Brief application is configured on the Team City server, where it is compiles the budget book, when the process is done, the book is checked back into Subversion for users to review.   

Figure 1

We have chosen the existing setup for the Budget In Brief application's integration at our client's real-time environment. The Subversion is the universally recognized centralized version control system characterized by; its reliability, simplicity of its usage, and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations. In this case all documents are stored in a such way that developers, analysts and business decision makers can easily access the files. The Team City is the best continuous integration solution on the market today.
It is good idea to mention that there are many other environments, which could provide similar functionality and where Budget In Brief could be integrated with similar simplicity. 

How was that done?

Budget In Brief Configuration

In this configuration the client computers do not need to have the Budget In Brief application installed.

The Budget In Brief application was simply copied into the BiB folder on the C:\ disk of one the Build Agents servers, configured with Team City. We used only one Budget In Brief license.


Figure 2

Subversion Configuration

The following screenshot will show how the files and folders are organized at the Subversion.

   Files in Subversion
Figure 3  

Notice that folder has two book files and These book files represent content for different versions of the document. As you already know you can mix and match any combination of content documents. In our case version 2.9 book will have  source documents from the Accounts folder, while the version 2.10 book does not include Accounts folder content. Both books share documents from the Transactions folder.

In Figure 4, you will see a few Microsoft Word DOCX files that are checked into the Accounting Method folder, which is controlled by the Subversion server. All documents are up to date in this folder.

Figure 4

Builder Agent  Configuration 

As the next step we need to configure the Environment Variable on each Build Agent Server that has the Budget In Brief installed. In our case there was only one Build Agent to be configured.

Figure 5

The reason we need to configure the BiB environment variable is, to minimize hard coding across multiple build scripts, and to simplify the build agent dependency configuration in the Team City server. If you do not want to use an environment variable, then you need to hard code the path to the Budget In Brief application, inside all build scripts, and make sure that that all the build agents have the Budget In Brief application deployed to the same location. 

Here is the source code for the build script: 

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="BuildDBUnitTests"
xmlns="" ToolsVersion="3.5">
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks"/>
<Target Name="BuildDBUnitTests">
<Exec Command="C:\BiB\bibc.exe &quot;$(teamcity_build_checkoutDir)\ARI&quot; &quot;$(teamcity_build_checkoutDir)\ARI\; /outputfolder &quot;$(teamcity_build_checkoutDir)\Draft&quot; /outputfile &quot;ARIUseCase&quot;"/>

Team City Configuration

We have created  "ARI Documentation" project.

1. General Settings page

On the General Settings page, we have configured Artifact. Our final generated book will be that artifact.

Note: The artifact should be configured as ZIP file, otherwise, due to the DOCX file structure, Team City will recognize it as the ZIP archive. To prevent this you need to move the DOCX file into the ZIP file.

General Settings
Figure 6

Leave all other settings on the General Settings page as default.

2. Version Control Settings page

Attach the URL path to the Subversion Documentation folder path to the URL: "http://someserver/Documentation", and configure to use build server login credentials. 

After we attach the Documentation folder, we need to set up two Checkout rules:

  1. +:Build Scripts/ARI=>Build Scripts
  2. +:ARI=>ARI

Then configure the checkout directory to the "DocumentationARI" location.

3. Runner: Build Steps

Set the Build File Path to "Build Scripts\build.proj".

Note: On the previous step, we have mapped the Build Script from "ARI\Build Scripts\build.proj" to "Build Scripts\build.proj". We did this trick for convenience, in case we ever need to move build script or use different script. In such a case we would only have to change mappings.

Set MSBuild Version to ".NET Framework 4". Because the script was written in .net 4 framework.

Note: We have used MSBuild, but you can do the same with the Nant.

4. Agent Requirements

Add the requirement for the Budget In Brief Environment Variable, we have created earlier.

Note: Configure the separate Environment Variable for each build agent that will execute the Budget In Brief application


 Figure 7

And that is it.

We are ready to run the project build.

Figure 8

When build is done, we have the artifact, which is our final book.

Figure 9


Fully automated life cycle process runs on the server: The user contributes; The content management system ensures in safety of the valuable data and controls the access; The distributed build management and continuous integration server runs automated process; The Budget In Brief application creates the book; Artifacts uploaded back to the content management system to review by the distinguished user.

Besides the Subversion version control system, similar integration could be achieved with the content management systems like the SharePoint. The Team City server will support most of the available source control and content management systems like Clear Case, Microsoft Team Foundation Server.

In the near future, we will demonstrate how to integrate Budget In Brief with the Share Point. Figure 1 shows the full enterprise life cycle process with the Budget In Brief application:    

Share This Using Popular Bookmarking Services

re: Subversion and Team City Integration

Wednesday, April 13, 2011 10:22:31 AM Bib Content Editor

Hi Mark,
we do have a task in our queue to write a blog article about that.
In meantime to get you up to speed:
- try latest beta that supports URI for the online resources;
- we do use similar to this article set up for the TeamCity;
- build script has following addition lines to update version of the manual in the reference file;

<Exec Command="powershell &quot; (Get-Content '$(teamcity_build_checkoutDir)\Docs\Documentation\UserManual\Data\documentation.reference') | Foreach-Object { $_ -replace 'Current_Version_Value', '$(build_number)' } | Set-Content '$(teamcity_build_checkoutDir)\Docs\Documentation\UserManual\Data\documentation.reference' &quot;"/>


- and then simply compile a book 



<Exec Command="bibc.exe &quot;$(teamcity_build_checkoutDir)\Docs\Documentation\UserManual&quot; &quot;$(teamcity_build_checkoutDir)\Docs\Documentation\UserManual\; /outputfolder &quot;$(teamcity_build_checkoutDir)\Docs\Documentation\UserManual\Draft&quot; /outputformat PDF"/>


re: Subversion and Team City Integration

Tuesday, April 12, 2011 5:18:59 PM MarkGoldberg

my question is more related to the news post, but i could not post my questions there, so I am posting it in most related blog.

Will you have an online example on how you doing that? I mean manuals in PDF.


Comments are closed on this post.

Site Map | Printable View | © 2008 - 2017 Budget In Brief | Powered by mojoPortal | HTML 5 | CSS | Design by styleshout