Agents in Azure DevOps Pipeline
- Azure DevOps Pipelines have two types of Agents
- Microsoft hosted Agents
- Refer Here for the official docs
- Size is always fixed
Standard_D2S
i.e.2 vcpu's 8 GB RAM
- When to use:
- Build/Deploy uses standard tools/softwares and if the configuration required matches the above statement
- No/Little configuration is what you like in CI/CD pipelines for executions
- Self Hosted Agents
- Refer Here for docs
- You need to configure agent to connect to azure devops
- Microsoft hosted Agents
- Azure DevOps Pipleines can be summarized as shown below
Exercise: Setting up agent to build jdk 17 and maven based softwares
- Create a linux vm
- install jdk 17 and maven
sudo apt update
sudo apt install openjdk-17-jdk maven -y
- Now navigate to project settings and agent pools
- Now configure account and permissions Refer Here
-
Configure the agent according to the steps on documentation
- Now lets try to create a simple azure devops build pipeline
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
name: Default
steps:
- bash: printenv
- Run the pipeline