Is there a tool to validate an Azure DevOps Pipeline locally?

落花浮王杯 提交于 2019-12-03 09:49:28

问题


When making changes to YAML-defined Azure DevOps Pipelines, it can be quite tedious to push changes to a branch just to see the build fail with a parsing error (valid YAML, but invalid pipeline definition) and then try to trial-and-error fix the problem.

It would be nice if the feedback loop could be made shorter, by analyzing and validating the pipeline definition locally; basically a linter with knowledge about the various resources etc that can be defined in an Azure pipline. However, I haven't been able to find any tool that does this.

Is there such a tool somewhere?


回答1:


You can run the Azure DevOps agent locally with its YAML testing feature.

Use Visual Studio Team Services Agent to install an agent on your local machine and use the agent local YAML testing feature that is available within the agent.

This should get you very close to the type of feedback you would expect.

Hope this helps.



来源:https://stackoverflow.com/questions/53041678/is-there-a-tool-to-validate-an-azure-devops-pipeline-locally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!