相关疑难解决方法(0)

Azure Pipelines YAML:意外的值“变量”和意外的“阶段”

我已经非常接近我的模板和使用它的部署 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
Run Code Online (Sandbox Code Playgroud)

这是使用它的部署 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'
Run Code Online (Sandbox Code Playgroud)

任何帮助,将不胜感激。我确定它就在我的鼻子前,但我已经挣扎了好几天,所以我认为是时候寻求帮助了。

yaml azure-devops azure-pipelines

0
推荐指数
1
解决办法
1707
查看次数

标签 统计

azure-devops ×1

azure-pipelines ×1

yaml ×1