是否有在本地验证 Azure DevOps Pipeline 的工具? [英] Is there a tool to validate an Azure DevOps Pipeline locally?

查看:23
本文介绍了是否有在本地验证 Azure DevOps Pipeline 的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对 YAML 定义的 Azure DevOps 管道进行更改时,将更改推送到分支只是为了看到构建失败并出现解析错误(有效的 YAML,但无效的管道定义),然后尝试尝试 -and-error 解决问题.

如果可以通过在本地分析和验证管道定义来缩短反馈循环,那就太好了;基本上是一个关于可以在 Azure pipline 中定义的各种资源等知识的 linter.但是,我找不到任何可以执行此操作的工具.

哪里有这样的工具?

解决方案

更新:此功能已于 10 月在问题 #2479 中删除,2019


<块引用>

您可以使用其 YAML 测试功能在本地运行 Azure DevOps 代理.

  1. microsoft/azure-pipelines-agent 项目,安装一个本地计算机上的代理.
  2. 然后使用 运行本地(仅限内部)以访问代理中可用的功能.

这应该会让您非常接近您期望的反馈类型.

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?

解决方案

UPDATE: This functionality was removed in Issue #2479 in Oct, 2019


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

  1. From the microsoft/azure-pipelines-agent project, to install an agent on your local machine.
  2. Then use the docs page on Run local (internal only) to access the feature that is available within the agent.

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

这篇关于是否有在本地验证 Azure DevOps Pipeline 的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆