Azure DevOps中的多个YAML构建管道 [英] Multiple YAML build pipelines in Azure DevOps

查看:148
本文介绍了Azure DevOps中的多个YAML构建管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用新的YAML方法在Azure DevOps中为我的Angular应用创建多个构建管道. 当我使用旧版"可视化生成器时,我曾经为已设置的不同环境(开发,暂存,生产)创建新的构建管道.

I'm currently trying to create multiple build pipelines for my Angular app in Azure DevOps using the new YAML way. I used to create a new build pipeline for the different environments I've set up (dev, staging, prod) when I was using the "legacy" visual builder.

但是由于每次我尝试创建新管道时都切换到YAML样式的构建定义,因此将我重定向到现有的azure-pipelines.yml.据我所知,来自文档,也无法在单个.yml文件中定义多个管道.

But since I've switched to YAML-style build definitions everytime I try to create a new pipeline I get redirected to the existing azure-pipelines.yml. As far as I can tell from the docs it is not possible to define multiple pipelines in a single .yml file either.

Azure DevOps当前不支持此方案吗?

Is this scenario currently not supported in Azure DevOps?

推荐答案

受支持. VSTS自动选择了azure-pipelines.yml,您可以创建尽可能多的yaml文件,并手动为它们创建构建.唯一的区别.

It is supported. azure-pipelines.yml is being auto-picked up by VSTS, you can create as many yaml files and create builds manually for those. that's the only difference.

因此您需要使用不同的Yaml文件为不同的环境手动创建版本.

so you need to manually create builds for different envs using different yaml files.

在构建步骤选择中选择以下内容:

on the build steps selection pick this:

这篇关于Azure DevOps中的多个YAML构建管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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