Setting up containerized azure pipeline agents into Azure Devops
This is a tutorial for setting up build agents in Azure Devops. Lets say you would like to add more build agents, there's a couple of ways to do it. You can add vm scale set or you can use docker.
This tutorial is about using microsoft pipeline agent image to add an agent to your Azure Devops pipeline build process.
The setup is pretty easy, all you need is to generate your PAT token. You need to have AGENT READ-WRITE SCOPE.
Run docker command
sudo docker run \
-e VSTS_ACCOUNT=cdiwi \
-e VSTS_TOKEN=YOUR_PAT_TOKEN_WITH_AGENT_READWRITE \
-e VSTS_AGENT='jeremydev-agent' \
-e VSTS_WORK='/var/vsts/$VSTS_AGENT' \
Once you have your container running you should see the following outputs:-
And if you go back to your Azure Devops pipeline and start looking for the agent name 'jeremydev-agent', you should be able to see something similar below :-