使用Azure DevOps将Umbraco v8应用程序部署到Azure [英] Deploying Umbraco v8 app to Azure using Azure DevOps

查看:106
本文介绍了使用Azure DevOps将Umbraco v8应用程序部署到Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人使用Azure DevOps将Umbraco v8应用程序部署到Azure? 我可以通过Visual Studio成功进行部署,但是Azure DevOps似乎只能将所有dll复制到目标,没有任何视图或任何内容,并且不会生成zip.

Has anyone used Azure DevOps to deploy an Umbraco v8 application to Azure? I can successfully deploy via Visual Studio, but Azure DevOps only seems to copy over all the dlls to the target, no views or anything, and a zip does not get generated.

如果有人设法做到这一点,他们可以分享他们采取的步骤吗? 我在管道中执行的步骤是:

If anyone has managed this could they share the steps they took please? The steps I have in the pipeline are:

  • 构建
  • 测试
  • 部署
  • 发布符号
  • 将文件复制到
  • 发布工件

我注意到的是我需要一个发布配置文件才能从Visual Studio成功发布,但是我看不到Devops中应该包含配置文件的位置,除非它应该在构建参数中?

What I did notice is that I need a publish profile to successfully publish from Visual Studio, however I cant see where a profile should be included in Devops, unless it should be in the build arguments?

我当前的构建参数:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" 

我正在使用Visual Studio Build任务.

I'm using the Visual Studio Build task.

推荐答案

要直接回答您的问题,可以使用MSBuild参数在此处进行部署或中断部署.您可以在我的屏幕快照中看到我的部署.我从Umbraco成功的生产部署中提取了它.

To straight up answer your question, yes MSBuild arguments make or break the deployment here.You can see mine in my screenshot. I took it from a production deployment that's successful for Umbraco.

所以我看不到您的实际管道,但是从我看来,您实际上并没有构建"该应用程序.

So I can't see your actual pipeline, but from what I see you don't actually 'build' the application.

因为您必须先使用Nuget,然后还原软件包,然后构建应用程序.您不需要复制任何内容(因此您不需要复制步骤),只要使用正确的MS Build参数,它就可以自行生成并复制到build.artifactstagingdirectory.然后,您需要具有适当的发布管道,但一次只有一件事.我使用的构建步骤位于下面. npm custom步骤之后是应用程序的实际构建.

As in you have to use Nuget first, then restore the packages, then build the application. You don't need to copy anything (so you don't need a copy step), with the correct MS Build arguments it will build and copy to build.artifactstagingdirectory on its own. Then you need to have the appropriate release pipeline, but one thing at a time. The build steps I use are underneath. After the npm custom step is the actual building of the application.

P.S.确保csproj中包含了用于运行该应用程序的适当文件,因为那是azure devops读取选择和构建内容的地方.

P.S. Make sure that the appropriate files to run the application are included in the csproj, because that's where azure devops reads what to pick and build.

这篇关于使用Azure DevOps将Umbraco v8应用程序部署到Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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