【发布时间】:2020-12-02 12:09:36
【问题描述】:
我已经非常接近我的模板和使用它的部署 yaml。但是我遇到了错误
意外的值“变量” 意外值“阶段”
我确定我的语法错误,但我终生无法理解为什么。
这是我的模板的开始
#File: template.yml
parameters:
- name: repositoryName
type: string
default: ''
variables:
tag: '$(Build.BuildId)'
buildVmImage: 'ubuntu-latest'
deployPool: 'deploy-pool'
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: $(buildVmImage)
steps:
- checkout: self
submodules: recursive
这是使用它的部署 yaml
# Repo: Organization/Project
# File: azure-pipelines.yml
trigger:
- develop
- next
- master
resources:
repositories:
- repository: template
type: git
name: AzureDevOps/AzureDevOps
jobs:
- template: template.yml@template
parameters:
repositoryName: 'exampleName'
任何帮助将不胜感激。我确定它就在我的鼻子前面,但我已经挣扎了好几天,所以我认为是时候寻求帮助了。
【问题讨论】:
-
嗨朋友,你有机会试试我的答案吗?
标签: azure-devops yaml azure-pipelines