gpt4 book ai didi

azure-devops - 尝试使用 azure-pipelines.yml 将管道池设置为默认代理池时出错

转载 作者:行者123 更新时间:2023-12-04 01:45:35 33 4
gpt4 key购买 nike

我遵循了通过 Pipelines Schema Docs 设置池的文档
并将其设置为 pool: Default .这应该引导管道使用默认池:

Default agent pool under All agent pools in dev-ops UI

但是,我不断收到此错误:

Could not find a pool with name Default. The pool does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.

Could not find a pool with name Default. The pool does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.



据我所知,它应该得到授权。

我也试过:
pool:
name: Default

完整的 azure-pipelines.yml
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)

trigger:
batch: true
branches:
include:
- master
- develop

pool: Default

variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@0

- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

最佳答案

可以引用这个链接:https://aka.ms/yamlauthz解决这个问题;)

尝试将您的分支更改为任何其他分支并保存您的管道,然后将其改回并保存。之后运行管道。

要完成此操作,请单击 Pipelines/Build 页面右上角的 Edit。您将看到 YAML 编辑工具。现在单击右上角的汉堡包图标并选择变量。这将带您进入经典编辑器。在经典编辑器中单击 YAML 选项卡。在 YAML 选项卡下,您可以选择获取源并更改默认分支。

关于azure-devops - 尝试使用 azure-pipelines.yml 将管道池设置为默认代理池时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55424303/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com