-1

I'm converting a standard Azure Devops pipeline to a yaml pipeline.

Currently, my azurepipelines.yml has an error I don't understand. It's a simple powershell script, I copied the yaml from the pipeline, and placed it in the azurepipelines.yml.

enter image description here

Error is presently at line 49.

                 displayName: 'PowerShell Script'
                 inputs:
                   scriptType: inlineScript
                   inlineScript: | 
                
                   [pscustomobject]@{"gitversion" = "$(GITVERSION.NuGetVersion)" } | Export-Csv "buildparams.csv" -NoTypeInformation```

  • issue resolved, I was missing a space before [pscustomobject... resolution found here https://www.benday.com/2021/08/17/yaml-error-in-azure-pipelines-yml-bad-indentation-of-a-mapping-entry/ – Jason Morris Aug 03 '23 at 20:45
  • Don't post screenshots of text, especially code. Post the code, formatted appropriately. – Daniel Mann Aug 03 '23 at 23:14
  • thank you @DanielMann for pointing that out, I added the code inline. Originally added the image to show the validation errors. – Jason Morris Aug 09 '23 at 16:06

0 Answers0