Azure pipeline on PR validate file before merging to master branch

Copper Contributor

Hi Team,


I have a master branch that contains multiple YAML files. Every YAML file change will be pushed to feature/{filename. yaml} and with pull request will be merged to the master branch.

But before merging I need to validate that file from the feature has valid YAML syntax.

If the syntax is not valid build will fail and not be merged to the master branch.

But if everything is ok I need to send the content of the yaml file to the API endpoint, and then merge it to the master branch.


0 Replies