Azure DevOps 使用 yaml 文件构建管道不起作用

标签 azure azure-pipelines devops

我已经为我的项目创建了一个 build-pipeline.yml 文件,以便我的应用程序可以在 azure devops 中自动构建。

首先,我使用 DevOps UI 创建了一个管道,效果非常好。

所以我复制了使用 UI 创建的作业中的所有 yml。

然后我用这个 yml 文件创建了一个新的管道并运行这个管道,但是一开始我遇到了一些问题:


##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider InternalServerError
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider InternalServerError
,##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider InternalServerError
,##[error]Provisioning request delayed or failed to send 3 time(s). This is over the limit of 3 time(s).

Pool: Azure Pipelines
Started: Today at 10:07
Duration: <1s

Job preparation parameters
1 queue time variable used
system.debug : false


Report build status
<1s
Set build status for commit e720d4.



我的 yaml 文件如下所示:

pool:
  name: Azure Pipelines
steps:
- task: Docker@0
  displayName: 'build image'
  inputs:
    azureSubscription: 'TOOL'
    azureContainerRegistry: '{"loginServer":"abc.azurecr.io", "id" : "/subscriptions/a03e9b30-9b04-4e89-b366-117b3d6bf17e/resourceGroups/abcrg/providers/Microsoft.ContainerRegistry/registries/abcacr"}'

- task: Docker@0
  displayName: 'push image'
  inputs:
    azureSubscription: 'RCTOOL'
    azureContainerRegistry: '{"loginServer":"abctoolacr.azurecr.io", "id" : "/subscriptions/a03e9b30-9b04-4ed5-b3898-117b3d6bf17e/resourceGroups/abc-acr-rg/providers/Microsoft.ContainerRegistry/registries/abctoolacr"}'
    action: 'Push an image'

- task: HelmInstaller@0
  displayName: 'Install Helm '

- task: HelmDeploy@0
  displayName: 'Package Helm chart'
  inputs:
    azureSubscription: 'RCTOOL'
    azureResourceGroup: 'abc-rctool-k8s-rg'
    kubernetesCluster: 'abc-rctool-k8s'
    command: package
    chartPath: config/helm/eqcockpit

- task: PublishPipelineArtifact@1

所以我用谷歌搜索,但没有找到任何有用的解决方案。也许你可以帮助我。

最佳答案

看起来您的需要更新。从此列表中选择:Hosted Agent Pools 示例

pool:
  vmImage: vs2017-win2016

关于Azure DevOps 使用 yaml 文件构建管道不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57655025/

相关文章:

tfs - postman 客户端对 TFS 的请求

azure - 在模板参数中使用任务输出变量

azure - 长时间运行的 Web 作业被 Azure 中止

node.js - 如何将环境变量添加到 Azure Devops 管道中

azure - 从 Azure DevOps 池中删除代理

azure - 无法授权 Azure 订阅在基于 YAML 的管道中使用

docker - 为什么从 docker 文件构建会占用所有磁盘空间?

linux - 禁用 linux 用户身份验证,除了通过 ldap

azure - 如何通过 VM 大小 az cli 获取 azure VM 系列

azure - maxRecordsPerFile 在 Azure Data Bricks 中不起作用