test azure devops yaml

YamlPipelinesValidator.dev – Quickly and easily test Azure DevOps YAML pipelines

I’ve been slowly migrating all my Azure DevOps pipelines to the new YAML format and really been enjoying the benefits however there is currently no way to test a YAML pipeline before committing it. Having to commit the YAML before seeing if it’s valid may be fine if you’re just pushing to master and have no branch policies but if you have branch policies that require the use of pull requests (as you probably should) it soon becomes tedious when the pipeline fails due to it being invalid in some way.

What I really wanted was a way to test if the pipeline was syntactically correct before committing it but there didn’t seem to be a way to do this. Microsoft had started building that functionality into their on-premise agents however that was quickly abandoned. Azure DevOps do provide an API for testing a yaml pipeline however I wanted something a bit more user friendly.

After some searching I realised there wasn’t really anything that had the capability to do what I wanted so I decided to build it. I built YamlPipelinesValidator.dev! Now you can test your Azure DevOps YAML pipelines without committing anything! Underneath the UI it is just calling the Azure DevOps API so has the same limitations such as not being able to check the contents of variables or checking for correct values however it will stop you needing to commit over and over again just to check if it has the correct syntax or your task properties are correct!

All the code is available on my GitHub so if you have any issues let me know here or raise an issue (or raise a PR). Hopefully this will help you with your YAML pipelines and stop the endless cycle of commit – raise PR – run – fail. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.