Step by Step create a self Hosted Agent - leganderson-dev/Flyway_PoC_Onboarding GitHub Wiki
Click on pipelines on the left hand menu, Pipeline in the sub menu and select the ‘Create Pipeline’ and choose the option to ‘Use the classic editor’ selecting to continue with Azure Repos Git on the next page. We are now ready to begin building our pipeline.
Select ‘Empty Job’
In order to proceed we need to install the agents (Agent Pool box highlighted in red)
Click on ‘Manage’ highlighted in blue above the drop down
Now we need to download the agents so click on ‘Default’ and then ‘New agent’
In the pop-up box click on ‘Download’ and this will start the .zip file downloading to your default download location
While this is downloading we need to begin executing the Powershell scripts provided on screen – open Windows Powershell (x86) from the start menu
To install the agent we need to execute the following commands in Powershell / CMD Prompt (You will need to be running as administrator, right click on the Windows Powershell x86 and select ‘run as administrator’)
cd\
cd c:
mkdir agent
cd agent
Once the zip file is downloaded:
Copy and paste the text from the screen in ‘Create the agent’ –
Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-x64-2.170.1.zip", "$PWD") and click enter
Copy and paste the text from the screen in ‘Configure the agent’ - .\config.cmd
Once running this will request the server URL (take this from the Azure DevOps URL – e.g http://win-bd9hltshtf7/ )
Enter through the remaining options until you reach ‘Enter run agent as service? (Y/N)’ – enter Y
Press enter against user accounts to complete config