我正在尝试设置构建管道以在特定代理池上运行。目前它坚持致力于“Azure Pipelines”池:
但是我无法更改构建管道的代理池(至少我不确定如何更改)。
我的 YAML 如下所示:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Pack the package'
inputs:
command: 'pack'
configuration: 'Release'
packagesToPack: 'NugetComponents/**/*.csproj'
nobuild: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Run Code Online (Sandbox Code Playgroud)
我不确定这里是否需要更改任何内容。我在界面中找不到任何用于配置管道应使用哪个代理布尔值的内容?
Kev*_*SFT 12
根据有关代理池的文档,\xe2\x80\x9cAzure Pipelines\xe2\x80\x9d 池包含各种 Windows、Linux 和 macOS 映像。
\n\n\n\n\nAzure Pipelines 托管池将替换以前的托管池,\n 其名称已映射到相应的映像。之前托管池中的任何作业都会自动重定向到新 Azure Pipelines 托管池中的正确映像。
\n
因此,当您指定 Microsoft 托管代理(例如 Ubuntu-latest)时,管道将在 \xe2\x80\x9cAzure Pipelines\xe2\x80\x9d 池上运行。
\n\n更新
\n\n您可以在 \xe2\x80\x9cpool\xe2\x80\x9d 字段中指定目标代理池。
\n\n这是 Yaml 的格式:
\n\npool:\n name: string \n demands: string \n vmImage: string \nRun Code Online (Sandbox Code Playgroud)\n\n对于 Microsoft 托管的代理:您可以直接指定 \xe2\x80\x9cvmImage\xe2\x80\x9d。
\n\n例如:
\n\npool:\n vmImage: \'ubuntu-16.04\'\nRun Code Online (Sandbox Code Playgroud)\n\n对于自托管代理:您可以指定代理池名称。
\n\n例如:
\n\npool:\n name: Agent Pool name\nRun Code Online (Sandbox Code Playgroud)\n\n\n
| 归档时间: |
|
| 查看次数: |
16279 次 |
| 最近记录: |