How can I detect the Azure agent or Self-hosted agent in Azure devops pipeline?

Huong Truong Quoc 1 Reputation point
2022-04-08T09:02:28.337+00:00

For some reason, I want to detect which agent pipeline is running on to proceed with the appropriate action. May you give me some way to detect it in the pipeline?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,794 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 12,846 Reputation points
    2022-04-08T16:03:26.967+00:00

    Hello @Huong Truong Quoc - Welcome to Microsoft Q&A and thanks for reaching out.

    Devops is not currently supported here on Microsoft QnA.
    The Community Members and Engineers are actively answering questions in dedicated forums here. Please post your question in that forum:
    https://developercommunity.visualstudio.com/spaces/21/index.html
    https://azure.microsoft.com/en-in/support/devops/

    Hope this helps. and please feel free to reach out if you have any further questions.

    ------------------------------------------------------------------

    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.

    0 comments No comments