简体   繁体   中英

How can i know that a pipeline is using a microsoft hosted agent when running a pipeline?

In the project i'm working on, when i run some of the pipelines, they are configure to use by default an old agent pool that supposedly doesn't exist anymore.

If i go to Project settings > Agent pools i don't see it there anymore.

My question is if when i run the pipeline

在此处输入图像描述

If there is any place i can use to tell if the pipeline is using a self-hosted or microsoft-hosted agent?

The pipeline logs show you which pool and which agent are being used:

“初始化作业”管道日志

Starting: Initialize job
Agent name: 'ReleaseServerB-A002'
Agent machine name: 'ReleaseServerB'
Current agent version: '2.195.2'

You can use the variable Agent.Name If you want to write out or do something specific according to the agent.

The answer of @VinceBowdren gives an hint how we can get information about the agent of the running pipeline.

But specifically about the agent pools asked in the question, "Hosted" and "Hosted VS2017", they are deprecated microsoft hosted agents. Thats the reason they dont appear anymore in the agent pools list.

Pipelines that are configured using this agent pools will still be able to use them, but as soon as we save the pipeline to use another agent pool, it will not be possible to use them ever again.

We can confirm that these agent pools were deprecated here https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-155-update#single-hosted-pool

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM