Blogs about Jazz

Blogs > Jazz Team Blog >

Integrating Visual Studio builds with Team Concert

Many of you have asked if we support integrating automated Visual Studio builds with Rational Team Concert. The short answer is yes, but you’ll have to use the Eclipse Team Concert client to control and view the results.

When talking about build, it helps a lot to look at a picture. The following diagram taken from the build examples shows the different parts involved in a build. For integrations with the Team Concert client for Visual Studio you can use the continuous integration engines, integrate with the build toolkit, and store your results in the repository. Then use the Eclipse client to control and view the results.

Let’s see how this works in practice. As you would expect, as we were developing our client in Visual Studio we needed to automate our builds. We started by doing the following:

  • We wrote a set of MSbuild based batch files, calling devenv and other tools.
  • We tested the scripts locally, checked that the installer was created and that tests were being run. We used the Visual Studio test infrastructure, but you could easily of used NUnit instead.
  • After the scripts were in place, we figured out how to have them called from a command line build engine. This basically simulates what we did in the first step, but invoked from the build engine instead of manually from the command line. The command line output is automatically attached to the build result. Of course, you have to ensure that your batch files are parameterized as you can see is the following build definition screenshots:


  • At this stage we have automated builds running, but we don’t have the install being uploaded or the individual test files available from the build. To further integrate, we used the Jazz Build toolkit Ant tasks, as shown in the C++ build example. From the batch file, you can call into the Ant tasks that ship with Team Concert:

:StartActivity
java -cp %CLASSPATH% %ANT_LAUNCHER% -f “%DEST_DIR_PATH%\RTC.NET Client\jazzBuildTasks.xml” -lib %JAZZ_TOOLKIT% -DuserId=%BUILD_USER_ID% -DpasswordFile=%JBE_PASS_FILE% -DrepositoryAddress=%REPOSITORY_URL% -DbuildResultUUID=%BUILD_UUID% -DactivityLabel=%1 startActivity
GOTO :EOF

:PublishFile
java -cp %CLASSPATH% %ANT_LAUNCHER% -f “%DEST_DIR_PATH%\RTC.NET Client\jazzBuildTasks.xml” -lib %JAZZ_TOOLKIT% -DuserId=%BUILD_USER_ID% -DpasswordFile=%JBE_PASS_FILE% -DrepositoryAddress=%REPOSITORY_URL% -DbuildResultUUID=%BUILD_UUID% -Dfile=%1 -Dlabel=%2 -Dtype=%3 publishFile
GOTO :EOF

To track the progress of the builds and browse the results you’ll have to use the Team Concert Eclipse client. The following screenshot shows the build activity and downloads that have been attached to the builds.

So the good news is that you can integrate your Visual Studio based builds. Over time we will try and provide more control and visibility from within the Visual Studio IDE. Before getting started with your builds, start by reading the build documentation and the examples. Then chime in to our forums if you need more help.

Cheers,
Jean-Michel