GitHunt
JO

johnlokerse/ado-yaml-validation

A PowerShell script that can validate YAML Azure pipelines against an Azure Pipeline

Validate Azure Pipeline YAML files

Introduction

This repository contains a script which does a check if the YAML file corresponds with the YAML schema of Azure DevOps. The script uses the official Microsoft Azure DevOps API. Also, this repository includes an example pipeline on how you use the PowerShell script.

The API output has been modified slightly because it was missing some useful information:

  • Added ResultMessage
  • Added StatusCode

Requirements

  • Personal Access Token with Build - Read & Execute permissions

Output

Success output:
valid

Error output:
image

Key concept

The purpose of this repository is to make it easier to validate YAML without being limited to the Azure DevOps GUI. This script can be used in either a pipeline or locally.


Feel free to contribute ๐Ÿ™‚

Additional information on my blog: https://johnlokerse.wordpress.com/2022/02/07/validating-yaml-using-azure-devops-or-cli/

Languages

PowerShell100.0%

Contributors

Created April 25, 2022
Updated July 9, 2025
johnlokerse/ado-yaml-validation | GitHunt