Set Up Continuous Integration with Team Foundation Server
Our tutorial continues with Julia, a developer on the Fabrikam team. She has already set up Team Foundation Server (TFS) and placed the team’s code under version control. She will now set up continuous integration builds, which helps her team discover faster when a check-in breaks a build or causes a test to fail.
Requirements
- Some features might not be available depending on your permissions or edition of Team Foundation Server. See Features Accessed Through Web Permissions.
In this topic
1. Set Up a Dedicated Build Server
Julia installs the build service on the team's build server (ff-builds).
To install the build service on a dedicated build server
To follow the tutorial for your project, download and install Visual Studio 2012 Team Foundation Server. See Installing Team Foundation Server and Visual Studio ALM.
Choose Install Team Foundation Server.
In Configuration Center, choose Configure Team Foundation Build Service, and follow the Start Wizard wizard.
On Project Collection, choose Browse. Find the team project collection that the build server supports, and continue.
Choose Configure later, Review.
Keep the default options as you finish the wizard.
Tip
For this release, you might have to install Visual Studio on the build server before certain solutions will build.
See How to: Install Team Foundation Build Service.
To configure the dedicated build server
On the build server, open the Team Foundation Server Administration console, and choose Build Configuration.
On Build Configuration, choose New Controller, New Agent to see the build agent properties.
Open the Controller list, and choose the controller to associate with this agent.
Choose Add new tag to add tags for this agent. Choose OK.
To create more agents, repeat the three previous steps.
2. Set Up the Drop Folders
Julia creates a folder where the Team Foundation build service can drop the builds. She gives folder permissions to the server that runs the build service (ALMSVR).
To set up drop folders
Create the folder for the build drops. Keep the path to the drop folder as short as possible.
Tip
The build agent fails on paths that exceed 259 characters.
Give the server that's running the build service Read and Change permissions to the drop folder. (For Julia, that's $ALMSVR.)
See Set Up Drop Folders.
3. Create the Continuous-Integration Build
Julia creates a build definition for continuous integration so that a build will start whenever someone checks in code.
To create a continuous-integration build
Open Team Explorer. Under Home, choose Builds.
Under Builds, choose New Build Definition.
On the new build-definition page, choose Trigger.
Select Continuous Integration.
On Build Defaults, specify the drop folder.
See:
Note
You can create different types of builds based on your team’s needs. For example, you can schedule nightly builds to support your testing work. You can protect high-level branches by using gated check-ins. For more information about build verification tests (BVTs), see How to: Configure and Run Scheduled Tests After Building Your Application.
Related Topics in this Tutorial
Next (Create the Backlog) | Home
See Also
Concepts
Other Resources
Visual Studio ALM Rangers Solutions and Projects
Technical Articles for Visual Studio Application Lifecycle Management