Azure Pipeline YAML 无效——不知道为什么

问题描述 投票:0回答:1

如果有人可以帮助我,我不确定 yaml 出了什么问题。我检查了 5 或 6 个不同的在线 YAML 编辑器,我被告知它是“有效”的 yaml。

我在那里有一个 nuget pack 命令——等待在我获得此文件上的有效语法时添加 nuget 推送..

trigger:
  batch: true
  branches:
    include:
      - "*"
name: "SharpPDFLabel Build"
pool:
  vmImage: "windows-latest"
variables:
  solution: "**/SharpPDFLabel/*.sln"
  buildPlatform: "Any CPU"
  buildConfiguration: "Release"
  Major: "1"
  Minor: "0"
  Patch: "0"
steps:
  - task: NuGetToolInstaller@1
  - task: NuGetCommand@2
    inputs:
      restoreSolution: "$(solution)"
  - task: VSBuild@1
    inputs:
      solution: "$(solution)"
      platform: "$(buildPlatform)"
      configuration: "$(buildConfiguration)"
  - task: VSTest@2
    inputs:
      platform: "$(buildPlatform)"
      configuration: "$(buildConfiguration)"
  - task: NuGetCommand@2
    inputs:
      command: "pack"
      versioningScheme: "byPrereleaseNumber"
      majorVersion: "$(Major)"
      minorVersion: "$(Minor)"
      patchVersion: "$(Patch)"     
      packagesToPack: "**/SharpPDFLabel/SharpPDFLabel.csproj"
      packDestination: "$(Build.ArtifactStagingDirectory)"
azure-devops azure-pipelines azure-pipelines-yaml
1个回答
0
投票

不知道为什么投反对票?可能是缺少更新?管道曾经/现在是有效的...问题是我已通过管道文件从

azure-pipelines.yml
重命名为
<custom>-pipeline.yml
。一旦我将其重命名为
azure-pipelines.yml
,上面的工作就成功了

© www.soinside.com 2019 - 2024. All rights reserved.