# AzurePipelinesPS session
$session = 'myAPSessionName'
# Path to my local yaml
$path = ".\extension.yml"
# The id of an existing pipeline in my project
$id = 01
# The master branch of my repository
$resources = @{
repositories = @{
self = @{
refName = 'refs/heads/master'
}
}
}
Test-APPipelineYaml -Session $session -FullName $path -PipelineId $id -Resources
$resources
An IDE (VS Code as a popular example) - which will perform validation
on the fly
配置上面的两个组件,以便为更大的利益一起工作
模式可以在很多地方找到,对于这种情况,我建议使用 < a href = “ https://www.schemastore.org/json/”rel = “ norefrer”> https://www.schemastore.org/json/
它有 Azure 管道模式(这个模式包含一些问题,比如与 Microsoft 文档相比不同类型的值,但仍然包含无效语法的情况)
VS Code will require an additional plug-in to perform YAML text validation, there are also a bunch of those, who can validate schema. I'll suggest try 来自 RedHat 的 YAML (I know, the rating of the plugin is not the best, but it works for the validation and is also configurable)