I am trying to assign a specific agent on my agent pool but I don't know how to do it. Does anyone know it?
I tried with this but doesn't work:
- stage: Deploy
pool: alm-aws-pool
agent.name: deploy-05-agent1
I am trying to assign a specific agent on my agent pool but I don't know how to do it. Does anyone know it?
I tried with this but doesn't work:
- stage: Deploy
pool: alm-aws-pool
agent.name: deploy-05-agent1
The pool name needs to add to the name
field, then you could add demands
. You may try the following Yaml Code:
stages:
- stage: Deploy
pool:
name: AgentPoolName(e.g. alm-aws-pool)
demands:
- agent.name -equals Agentname (e.g. deploy-05-agent1)
jobs:
- job: BuildJob
steps:
- script: echo Building!
Please check if it could work.
Hope this helps.
Use demands
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/demands?view=azure-devops&tabs=yaml
- stage: Deploy
pool: alm-aws-pool
demands:
- agent.name -equals deploy-05-agent1