azure-devopsazure-pipelinesbuild-agent

How to find out Azure DevOps Services pipeline demand / capability requirements to select some specific agent? (implicit and explicit demands)


I have a simple yaml pipeline file as follows:

stages:
  - stage: build_xm2simu
    displayName: This is the build stage of the XM Simu project
#    dependsOn: string | [ string ]
#    condition: string
    jobs: 
    - job: linux_dotnet_build
      pool: 
        name: my-desktop
#        demands: 
#        - netcore -equals 3.1
      steps: 
      - powershell: dotnet restore source\backend\XM2Simu\XM2Simu.csproj

and I also have configured three different agents:

In case I remove the explicit demand with netcore then it runs on my windows host agent and fails as expected since there is no source\backend\XM2Simu\XM2Simu.csproj file currently there.

In case the netcore demand is added, it doesn't finds any agent suitable, and I only get the following message:

Waiting for an available agent. All eligible agents are disabled or offline

I also get the above message in case the netcore demand is removed but the windows host agent is offline.

Question: How to find out Azure DevOps Services pipeline demand / capability requirements to select some specific agent? (implicit and explicit demands)

Note: I'm currently investigating this issue and maybe related to this post.


Solution

  • How to find out Azure DevOps Services pipeline demand / capability requirements to select some specific agent? (implicit and explicit demands)

    What you did should be correct.

    According to your troubleshooting steps and the error messages you get:

    Waiting for an available agent. All eligible agents are disabled or offline
    

    Besides, I also test your yaml file with my private agent, it works fine.

    It seems the error comes from the agent linux docker agent with dotne itself, it should not a eligible agents.

    So, first, we could check if that agent keep Online. If yes, we could try to update the agent.

    Second, if above not help, please download the latest agent from VSTS web page, and config again.

    Hope this helps.