Azure DevOps分支并建立部署策略
我正在研究Azure DevOps的Web服务项目。我已经写了YAML管道以进行构建和释放。
目前,我将YAML文件保存在开发分支中,并从同一分支创建管道作业。根据实践,我们有两个分支机构 - 主人&发展。那么,如何将单管路作业用于两个分支,并具有自动触发器的开发和计划基础的主分支呢?建立和部署代码到开发和主分支的最佳实践是什么?
I'm working on the web services project on the Azure DevOps. I have written the yaml pipeline for build and release.
Currently I have kept the yaml file in Develop branch and created the pipeline job from same. As per the practice, we have two branches - Master & Develop. So how I can use single pipeline job for both the branches with auto trigger for develop and schedules base for main branch ? What is the best practice to build and deploy the code to DEV, UAT and PROD environments for Development and Master branches?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:
您需要确保在主中和开发中使用管道使用的YAML文件,否则提交不会触发管道。
中的纯Yaml触发设置。
,一个管道
1
一个管道中的纯UI设置。
原始答案:
您可以覆盖管道的CI触发器。
开发分支的管道:
主人分支的管道:
/I.sstatic.net/l38ik.png“ rel =” nofollow noreferrer“>
Update:
You need to make sure the yaml file that the pipeline use exists in both master and Develop, otherwise the commit will not trigger the pipeline at all.
1, pure yaml trigger settings in one pipeline.
azure-pipeline.yml in Master branch:
azure-pipeline.yml in Develop branch:
2, pure UI settings in one pipeline.
Original Answer:
You can override the CI trigger of your pipeline.
Pipeline of develop branch:
Pipeline of master branch: