Articles → AZURE DEVOPS → Self-Hosted Agent In Azure Devops
Self-Hosted Agent In Azure Devops
- Create an agent pool
- Create Personal Access Token
- Install agent on the machine
- Change the agent pool of the pipeline
- Change in yaml file
- Queue the build
Create An Agent Pool
Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge
Create Personal Access Token
Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge
Install The Agent On The Local Machine
Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge
# The code will run “config.cmd”.
./config.cmd
- Server URL
- PAT
- Agent pool
Click to Enlarge
Click to Enlarge
Change The Agent Pool Of The Pipeline
Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge
Change In The Yaml File
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
name: myagentpool
demands:
- agent.name -equals DESKTOP-85KOUP0
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
Queue The Build
Click to Enlarge
Click to Enlarge