Azure 容器作业服务连接

Azure container job service connection

我正在尝试 运行 使用来自私有 azure 注册表的容器映像在 azure 管道中执行容器作业。

我遵循了 those instructions 并最终得到了这个管道配置:

resources:
  containers:
  - container: build_container
    image: gxg08regtest.azurecr.io/ci-build-image:66162
    endpoint: SandboxGXG08

pool:
  vmImage: 'ubuntu-16.04'

container: build_container

steps:
- script: ./build.sh

它似乎遵循了模式但仍然给出了这个错误:

Expected 'dockerregistry' service connection type for image registry referenced by build_container, but got azurerm for service connection SandboxGXG08.

在我看来,解析器在解析我的图像声明时无法匹配正确的模式。

有什么想法吗?

错误消息告诉您问题所在,错误消息(希望如此)通常会这样做:

Expected 'dockerregistry' service connection type for image registry referenced by build_container, but got azurerm for service connection SandboxGXG08.

您使用的服务连接类型有误。添加 Docker 注册表服务连接。您使用的是 Azure 资源管理器服务连接。