问题描述
通常,我通过Azure DevOps门户创建一个新的构建管道.然后,编辑器将带我完成选择项目源,存储库和模板的步骤.之后,我可以选择创建一个新分支或直接提交到master分支.
Usually, I create a new build pipeline via the Azure DevOps portal. Then, the editor will take me through the steps of choosing the project source, repository, and template. After that, I will have an option to create a new branch or commit directly to the master branch.
但是,这次,我的分支中已有一个 azure-pipelines.yml
文件.我在本地使用文本编辑器创建了该分支,并将该分支推送到Azure DevOps.我要附加此文件,并让Azure Pipelines创建新队列并将其排队.但是我找不到任何选择.导入构建管道选项仅接受JSON文件.
However, this time, I have an existing azure-pipelines.yml
file in my branch. I created it with a text editor locally and push this branch to Azure DevOps. I want to attach this file and let Azure Pipelines create and queue a new build. But I can't find any option. The importing build pipeline option only accepts JSON files.
是否可以从存储库中的现有YML文件创建新的构建管道?
Is it possible to create a new build pipeline from an existing YML file in the repository?
我知道我可以使用经典编辑器,该编辑器具有指定YML文件的步骤.但是我更喜欢这样一种选项,我可以在Azure DevOps门户上将YML编辑器与Task Assistant一起使用.
I know I can use the classic editor, which has a step to specify a YML file. But I prefer an option that I can use the YML editor with Task Assistant on the Azure DevOps portal.
谢谢大家.
推荐答案
如果将 azure-pipelines.yml
推送到新分支,则如果您有配置项触发器,Azure DevOps会自动检测到它将会看到构建开始运行.
If you pushed azure-pipelines.yml
to a new branch, Azure DevOps detect it automatically, if you have a CI trigger you will see a build start to running.
您可以创建一个新管道并指定一个现有的YAML文件:
You can create a new pipeline and specify an existing YAML file:
->选择您的存储库.
-> Choose you repository.
您还可以转到存储库构建页面(如果您已经通过其他分支对该存储库进行了构建),然后单击运行管道",然后选择该分支:
You can also can go the repo build page (if you already have a build for this repo with other branch) and click Run pipeline and there choose the branch:
这篇关于从存储库中的现有YML文件创建新管道(Azure管道)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!