Azure Pipeline YAML invalid -- not sure why

51 Views Asked by At

If someone can help me out, I'm not sure what the issue is with the yaml. I've checked 5 or 6 different online YAML editors and I've been told it's "valid" yaml.

I've got a nuget pack command in there -- waiting to add a nuget push for when I get valid syntax on this file..

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)"
1

There are 1 best solutions below

0
B-M On BEST ANSWER

The pipeline was/is valid... the problem was that I had renamed by pipeline file from azure-pipelines.yml to <custom>-pipeline.yml. Once I renamed it back to azure-pipelines.yml the above worked