TFS/VSTS Build Infrastructure and Naming
Agents are grouped in pools - by default there are 2 pools:
- Default pool - general purpose, where custom agents are registered. 1 agent free per user.
- Hosted pool - provided by Microsoft.
Machines can host multiple agents. Pools are exposed to projects using Agent Queues.
Agents are cross-platform and can be configured.
Build Definitions are created in the VSTS web view and are assigned to agents:
- Optionally select a build template to begin with (Visual Studio, Gradle, etc.)
- Select the repository source to use
- Select the agent pool to use
- Add/configure build steps:
- Tasks such as installing packages with NuGet, building the solution, testing assemblies, copying files, running scripts, and publishing artifacts.
Configuring a Custom Agent Pool
VSTS Settings --> VSTS Root --> Agent pools -> Download agent
Open admin cmd/powershell, cd into agent dir, then:
config.cmd
# Enter server URL: https://$(username).visualstudio.com
# Enter authentication type: (use default PAT, can create from VSTS --> security)
# Enter personal access token: see above
# Register agent pool: (create from VSTS Agent Pools)
# Enter agent name
# Enter work folder
# Run as a service? (N, interactive)
Different Builds for Different Purposes
- CI Build (Continuous Integration)
- Compile/test
- Nightly build (schedule)
- Compile
- Regression
- Provisioning
- Code Analysis
- Release build (manual)
- Compile
- Test
- Regression
- Configuration Management
- Archive