microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.72k stars 864 forks source link

is vsts-agent ignoring my onPrem agent when autocreating a build definition? #1437

Closed scottnasello closed 6 years ago

scottnasello commented 6 years ago

Hello

Whenever I create a new repo and specify an OnPrem agent in my .vsts-ci.yml (see below), it assigns the build to the Hosted VS2017 queue. It does appear that it is running on an OnPrem build server even though the gui says otherwise.

name: $(Build.DefinitionName)-$(Date:yyyyMMdd)$(Rev:.r)
queue:
  name: OnPrem
  demands: DotNetFramework

This article implies that the automatic build definition creation can only be hosted (see this snippet)

"Queue the build on any of our hosted agent pools, including Hosted VS 2017, Hosted Linux Preview or Hosted macOS Preview. You'll get different kinds of greetings from each of these typs of agent."

https://docs.microsoft.com/en-us/vsts/build-release/actions/build-yaml
screen shot 2018-03-04 at 12 52 22 pm screen shot 2018-03-04 at 12 53 05 pm
ericsciple commented 6 years ago

the queue shown in the web is the fallback for any phases in yaml where the queue is not specified

here is a better example: https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-queues.md

ericsciple commented 6 years ago

sorry i misread this a little bit the first time.

the UI is confusing because in your case, you specified one phase in the file and explicitly specified the queue on the phase. it would probably be less confusing in this case, if the fallback in the UI was the explicit one that was specified in the file.

TingluoHuang commented 6 years ago

@scottnasello is your question be answered? can we close the issue?

TingluoHuang commented 6 years ago

I am going to close this issue, i think the original question has been answered. please reopen if needed.