I'm trying to build an azure-pipelines.yml for a monorepo, and I'm struggling to figure out how to debug the file as I move along.
Is there a command such as az deployment validate ./azure-pipelines.yml
available?
If so, how do you recommend I go about doing this? I keep making changes, pushing them to my repo, and then letting Azure DevOps run it, and fail.
From within a YAML file open the Command Palette (Ctrl+Shift+P) and select the 'Azure Pipelines YAML Validator: Validate' command, alternatively use the keyboard shortcuts Ctrl+Alt+V on Windows and Ctrl+Cmd+V on Mac. Your YAML file will then be validated and any problems reported.
On the edit-page click on the three dots on the top right. (Optional) When using trunk based development you can choose the feature branch you are working in. In this menu, click on validate and a message will appear with either OK if the pipeline is validated correctly or an error message if the pipeline is invalid.
no, there is no way to validate it. when you try to run it - it will show you the error, thats the only real way to validate it.
this VSCode extension provides syntax highlighting and autocompletion.
https://marketplace.visualstudio.com/items?itemName=ms-azure-devops.azure-pipelines
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With