【发布时间】:2022-12-20 09:32:49
【问题描述】:
我正在尝试将 ADO YAML 文件编辑到最低限度,以便隔离另一个问题。
当我运行 Validate 时,它返回以下错误:
No repository found by name templates
这是我的 YAML 的一般要点:
#resources:
# repositories:
# - repository: templates
# type: git
# name: TemplateProject/TemplateRepo
name: $(VersionName)
trigger:
branches:
include:
- main
batch: true
paths:
exclude: $(ListOfExclusions)
stages:
- template: core/setVersion.yml@templates
- stage: Build
pool: linux
jobs:
- job: BuildDocker
displayName: Build and Push Docker Image
pool: linux
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(RepoName)
dockerfile: $(Build.SourcesDirectory)/Dockerfile
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(Tag)
可能出了什么问题?错误消息让我觉得 YAML 不干净。
【问题讨论】:
标签: azure azure-devops azure-pipelines azure-pipelines-yaml