【问题标题】:Can we use single CI CD pipeline for two different .net application solution?我们可以将单个 CI CD 管道用于两个不同的 .net 应用程序解决方案吗?
【发布时间】:2020-06-29 06:47:45
【问题描述】:
【问题讨论】:
-
无法获取最新信息,该解决方法对您有帮助吗?如果有帮助,请将其标记为答案,只需单击this 之类的选项即可。或者,如果您有任何疑虑,请随时在此处分享。
标签:
azure
azure-devops
azure-web-app-service
【解决方案1】:
只要代码在同一个存储库中,使用多个 .net 解决方案或任何其他类型就没有问题。
您还可以从同一管道发布多个工件
【解决方案2】:
如果您使用的是 YAML 管道,则可以在管道中检出多个存储库。
管道通常依赖于多个存储库。您可以拥有不同的存储库,其中包含构建代码所需的源、工具、脚本或其他项目。通过在您的管道中使用多个 checkout 步骤,您可以获取和签出除了用于存储 YAML 管道的存储库之外的其他存储库。
使用存储库资源声明的存储库:
resources:
repositories:
- repository: MyGitHubRepo # The name used to reference this repository in the checkout step
type: github
endpoint: MyGitHubServiceConnection
name: MyGitHubOrgOrUser/MyGitHubRepo
- repository: MyAzureReposGitRepository
type: git
name: MyProject/MyAzureReposGitRepo
steps:
- checkout: MyGitHubRepo
- checkout: MyAzureReposGitRepository
使用内联语法声明的存储库:
如果您的存储库不需要服务连接,您可以在签出步骤中将其声明为内联。
steps:
- checkout: git://MyProject/MyRepo # Azure Repos Git repository in the same organization
详情请参考本官方document。