When making changes to YAML-defined Azure DevOps Pipelines, it can be quite tedious to push changes to a branch just to see the build fail with a parsing error (valid YAML, but invalid pipeline definition) and then try to trial-and-error fix the problem.
It would be nice if the feedback loop could be made shorter, by analyzing and validating the pipeline definition locally; basically a linter with knowledge about the various resources etc that can be defined in an Azure pipline. However, I haven't been able to find any tool that does this.
Is there such a tool somewhere?
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.
To view active release pipelines, select Pipelines > Releases. From there, you can drill into the details of a release. For example, here we show the Release-3 pipeline.
Run unit tests locally and then in Azure Pipelines. Add dashboard widgets to visualize test runs over time. Perform code coverage testing to see how much of your code is covered by unit tests. Fix and verify test failures in your build pipeline.
Azure DevOps (ADO) is not going away anytime soon and will get plenty of love. It is one of the undervalued things about Microsoft – its long-term commitment to the lifecycle of its software and providing new features and support for its customers.
You can run the Azure DevOps agent locally with its YAML testing feature.
- From the microsoft/azure-pipelines-agent project, to install an agent on your local machine.
- Then use the docs page on Run local (internal only) to access the feature that is available within the agent.
This should get you very close to the type of feedback you would expect.
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