使用 ASP.NET yaml 模板的新 Azure DevOps 管道失败
New Azure DevOps pipeline using ASP.NET yaml template failing
我有一个 GitHub 存储库,其中包含一个 .NET Core 3.0 网站解决方案。在 Azure DevOps 中,我通过向导在向导的配置步骤中使用 ASP.NET Core 模板创建了一个链接到该存储库的新管道。这就是我的 YAML 的样子:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- develop
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
当我尝试手动 运行 管道进行测试时,这是我每次得到的输出:
##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[error]Provisioning request delayed or failed to send 5 time(s). This is over the limit of 3 time(s).
Pool: Azure Pipelines
Image: ubuntu-latest
Started: Yesterday at 10:04 PM
Duration: 10h 54m 5s
Job preparation parameters
ContinueOnError: False
TimeoutInMinutes: 60
CancelTimeoutInMinutes: 5
Expand:
MaxConcurrency: 0
########## System Pipeline Decorator(s) ##########
Begin evaluating template 'system-pre-steps.yml'
Evaluating: eq('true', variables['system.debugContext'])
Expanded: eq('true', Null)
Result: False
Evaluating: resources['repositories']['self']
Expanded: Object
Result: True
Evaluating: not(containsValue(job['steps']['*']['task']['id'], '6d15af64-176c-496d-b583-fd2ae21d4df4'))
Expanded: not(containsValue(Object, '6d15af64-176c-496d-b583-fd2ae21d4df4'))
Result: True
Evaluating: resources['repositories']['self']['checkoutOptions']
Result: Object
Finished evaluating template 'system-pre-steps.yml'
********************************************************************************
Template and static variable resolution complete. Final runtime YAML document:
steps:
- task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1
inputs:
repository: self
我想也许 ubuntu-latest 可能不再是有效的 vmImage,所以我尝试将其更改为 ubuntu- 18.04 得到了同样的结果。 Micosoft-hosted agents 文档说两者都应该有效。
我的 yaml 文件有问题吗?我之前使用旧的 no-yaml 接口设置管道没有问题,所以我有点困惑。
我想现在它应该是这样的:
trigger:
- develop
jobs:
- job: buildjob
variables:
buildConfiguration: 'Release'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
虽然 this 说如果你只有一份工作,你可以省略工作,但我没有看到你的 yaml 有什么问题,除了你直接使用步骤(同样,应该没问题)
您的 yaml 文件和格式看起来没有问题。
因为您使用的是带有 .NET Core 3.0 网站的 GitHub 存储库。创建管道时请注意,确保您选择了 GitHub 而不是 Azure Repos Git。
另外,正如您提到的 I have setup pipelines before with the old no-yaml interface with no issues
,您可以先使用经典编辑器设置管道。
还有一个查看 yaml 选项。
您可以按照该格式和内容创建一个 yaml 模板,这可能会成功。
我正在查看我的帐户,发现我的代理池设置在项目中看起来有点可疑。它显示我有 11 个在线可用代理,即使我在私人存储库上使用免费计划,所以它应该只有一个。
我最终删除了我的 Azure DevOps 组织并创建了一个新组织。现在我最初发布的 YAML 配置工作正常。
我有一个 GitHub 存储库,其中包含一个 .NET Core 3.0 网站解决方案。在 Azure DevOps 中,我通过向导在向导的配置步骤中使用 ASP.NET Core 模板创建了一个链接到该存储库的新管道。这就是我的 YAML 的样子:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- develop
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
当我尝试手动 运行 管道进行测试时,这是我每次得到的输出:
##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider NotFound
,##[error]Provisioning request delayed or failed to send 5 time(s). This is over the limit of 3 time(s).
Pool: Azure Pipelines
Image: ubuntu-latest
Started: Yesterday at 10:04 PM
Duration: 10h 54m 5s
Job preparation parameters
ContinueOnError: False
TimeoutInMinutes: 60
CancelTimeoutInMinutes: 5
Expand:
MaxConcurrency: 0
########## System Pipeline Decorator(s) ##########
Begin evaluating template 'system-pre-steps.yml'
Evaluating: eq('true', variables['system.debugContext'])
Expanded: eq('true', Null)
Result: False
Evaluating: resources['repositories']['self']
Expanded: Object
Result: True
Evaluating: not(containsValue(job['steps']['*']['task']['id'], '6d15af64-176c-496d-b583-fd2ae21d4df4'))
Expanded: not(containsValue(Object, '6d15af64-176c-496d-b583-fd2ae21d4df4'))
Result: True
Evaluating: resources['repositories']['self']['checkoutOptions']
Result: Object
Finished evaluating template 'system-pre-steps.yml'
********************************************************************************
Template and static variable resolution complete. Final runtime YAML document:
steps:
- task: 6d15af64-176c-496d-b583-fd2ae21d4df4@1
inputs:
repository: self
我想也许 ubuntu-latest 可能不再是有效的 vmImage,所以我尝试将其更改为 ubuntu- 18.04 得到了同样的结果。 Micosoft-hosted agents 文档说两者都应该有效。
我的 yaml 文件有问题吗?我之前使用旧的 no-yaml 接口设置管道没有问题,所以我有点困惑。
我想现在它应该是这样的:
trigger:
- develop
jobs:
- job: buildjob
variables:
buildConfiguration: 'Release'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
虽然 this 说如果你只有一份工作,你可以省略工作,但我没有看到你的 yaml 有什么问题,除了你直接使用步骤(同样,应该没问题)
您的 yaml 文件和格式看起来没有问题。
因为您使用的是带有 .NET Core 3.0 网站的 GitHub 存储库。创建管道时请注意,确保您选择了 GitHub 而不是 Azure Repos Git。
另外,正如您提到的 I have setup pipelines before with the old no-yaml interface with no issues
,您可以先使用经典编辑器设置管道。
还有一个查看 yaml 选项。
您可以按照该格式和内容创建一个 yaml 模板,这可能会成功。
我正在查看我的帐户,发现我的代理池设置在项目中看起来有点可疑。它显示我有 11 个在线可用代理,即使我在私人存储库上使用免费计划,所以它应该只有一个。
我最终删除了我的 Azure DevOps 组织并创建了一个新组织。现在我最初发布的 YAML 配置工作正常。