|
Navigation: Commands and Procedures > Automated Builds > Continous Integration |
![]() ![]()
|
Within Visual Build
The ContinuousIntegration.bld sample shows how to implement continuous integration builds (automatic builds whenever source code changes are submitted to source control) with Visual Build.
Team Foundation Build
Visual Build projects can also be called from Team Foundation Build by invoking the Visual Build command-line interface from an MSBuild Exec task. Add code like this to the end of the TFSBuild.proj file (see this article for more details on modifying and running the Team Build build definition):
</ItemGroup>
<Target Name="AfterCompile">
<Exec Command='"C:\Program Files\VisBuildPro8\VisBuildCmd" /b "$(SolutionRoot)\MyProject.bld"'/>
</Target>
</Project>
In addition to the AfterCompile target, several additional targets are available for specifying when Visual Build should be called. And the BeforeBuild and AfterBuild targets can also be used from regular Visual Studio 2005 thru 2012 projects (outside of Team Foundation Build).
CruiseControl .NET
Continuous integration can be implemented via CruiseControl .NET by invoking the Visual Build command-line interface from an Executable task in the CCNet.config file. For example:
<cruisecontrol>
<project>
<name>Sample</name>
<triggers />
<tasks>
<exec>
<executable>C:\Program Files\VisBuildPro8\VisBuildCmd.exe</executable>
<baseDirectory>C:\Program Files\VisBuildPro8\Samples</baseDirectory>
<buildArgs>/b RegEdit.bld</buildArgs>
<buildTimeoutSeconds>1000</buildTimeoutSeconds>
</exec>
</tasks>
</project>
</cruisecontrol>
Jenkins/Hudson
Continuous integration can be performed via Jenkins/Hudson by invoking the Visual Build command-line interface.
| 1. | In Jenkins/Hudson, create a new job to Build a free-style software project. |
| 2. | Add a build step of Execute Windows batch command with a command like: |
"C:\Program Files\VisBuildPro8\VisBuildCmd.exe" /b "C:\Program Files\VisBuildPro8\Samples\RegEdit.bld"
TeamCity
Continuous integration can be implemented via TeamCity by invoking the Visual Build command-line interface.
| 1. | In TeamCity, create a new project. |
| 2. | Create a new build configuration with a Runner Type of Command Line, a Working directory of the path to the .bld file, a Command executable of C:\Program Files\VisBuildPro8\VisBuildCmd.exe, and Command parameters of /b ProjectFile.bld. |