【问题标题】:Azure devops build pipeline with yaml file not working带有 yaml 文件的 Azure devops 构建管道不起作用
【发布时间】:2019-12-30 11:23:55
【问题描述】:

我为我的项目创建了一个 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

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

【问题讨论】:

  • 嗨,最近怎么样?在 YAML 中使用 vmImage 怎么样?以下答案是否可以帮助您避免错误?
  • 您好,下面的解决方案是否解决了您的问题?如果有,请标记为答案。如果没有,请告诉我们任何新信息以提供进一步帮助

标签: azure azure-pipelines devops


【解决方案1】:

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

pool:
  vmImage: vs2017-win2016

【讨论】:

  • 谢谢你。为我工作:)
  • 这对我不起作用。我使用参数来选择池,如下所示: ``` pool: name: {{ parameters['myPool'] }} ``` 使用自托管代理没问题。但它因“Azure 管道”而失败
  • 您必须指定实际的池名称,例如“vs2017-win2016”。 “Azure 管道”不起作用。
  • 它对我有用,谢谢
猜你喜欢
  • 1970-01-01
  • 2019-05-14
  • 2019-04-06
  • 2021-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-11
  • 2022-11-03
相关资源
最近更新 更多