[英]How to deploy multiple apps with Azure DevOps?
I have a .NET solution that contains several projects. 我有一个包含几个项目的.NET解决方案。 I want to set up a deployment pipeline in Azure DevOps but I'm not sure how to do this.
我想在Azure DevOps中设置部署管道,但我不知道如何做到这一点。 I want to have 1 pipeline that deploys the following projects:
我想拥有一个部署以下项目的管道:
How do I set this up? 我该如何设置? I selected the default 'Azure App Service Deploy' template, but in the deployment task I cannot select which project I want to deploy.
我选择了默认的“Azure App Service Deploy”模板,但在部署任务中,我无法选择要部署的项目。 The package refers to
$(build.artifactstagingdirectory)/**/*.zip
, but this is a zip file that contains the artifacts for both my web projects (and the database DACPAC is missing here). 该包引用
$(build.artifactstagingdirectory)/**/*.zip
,但这是一个zip文件,其中包含我的两个Web项目的工件(此处缺少数据库DACPAC)。
First things first. 首先要做的事情。 Copy the build artefacts into 3 different packages.
将构建工件复制到3个不同的包中。 Say,
说,
Artefacts1: For Web Apps Artefacts1:适用于Web Apps
Artefacts2: For Portal Apps Artefacts2:门户应用程序
Artefacts3: For DACPAC files Artefacts3:用于DACPAC文件
In this case you will have 3 copy files task copying and 3 publish build artefacts task to publish it to Azure DevOps. 在这种情况下,您将有3个复制文件任务复制和3个发布构建工件任务,以将其发布到Azure DevOps。 In the release pipeline, add 3 agent jobs to perform
在发布管道中,添加3个代理作业以执行
that's many questions in one, but I'd generally separate build\\release pipelines for each application (that way you have more control) and you dont have the problem of how to select proper zip file. 这是一个很多的问题,但我通常会为每个应用程序分离build \\ release管道(这样你有更多的控制权),你没有如何选择合适的zip文件的问题。 I'm pretty sure you cant even select a part of zip file (since you now have a single zip file with several solutions), so your approach is not going to work.
我很确定你甚至不能选择zip文件的一部分(因为你现在有一个包含多个解决方案的zip文件),所以你的方法不会起作用。
as for how to set this up: your build should build 1 project exactly and pack\\upload it. 至于如何设置它:你的构建应该完全构建1个项目并打包\\上传它。 and then your release will target that artifact and everything will work just fine.
然后你的发布将针对该工件,一切都会正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.