Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a json schema file for Azure Devops Pipelines

I have exported my pipeline from Azure Devops. This results in a json file I can import to create a new build definition. Is there a schema definition that defines this file. I would like to edit it (using VS) and a schema serve as documentation-instead of hacking it.

like image 692
jlo-gmail Avatar asked Jun 15 '19 17:06

jlo-gmail


2 Answers

There's yamlschema endpoint in Azure DevOps REST API that returns schema for YAML pipeline:

GET https://dev.azure.com/{organization}/_apis/distributedtask/yamlschema?api-version=5.1

Seems like this is where azure pipelines extension takes it from.

like image 54
qbik Avatar answered Sep 21 '22 14:09

qbik


I use vscode and I'm trying out the yaml extension. However, I found there is also an azure pipeline extension, but the yaml extension is more popular.

In order for me to get azure pipelines working on the yaml extension, I was able to find the json schema that azure pipelines used here. I referenced using the raw file, but there are still bugs here and there.

like image 27
Long Mai Avatar answered Sep 21 '22 14:09

Long Mai