[英]Azure function app deploy and release pipeline error
I pushed my .net core function application using visual studio and now setting up release pipeline.我使用 Visual Studio 推送了我的 .net 核心功能应用程序,现在正在设置发布管道。 I can publish and execute the application just fine and it works great on the Azure portal.我可以很好地发布和执行应用程序,它在 Azure 门户上运行良好。 However when I see the builds for releases in azure-devOps that slot fails with the following error.但是,当我在 azure-devOps 中看到版本的构建时,该插槽失败并出现以下错误。
2019-06-19T23:21:33.3543380Z ##[error]Error: Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task. D:\a\r1\a\_...AVFunctionCore.zip
I am not sure where I need to check in my setup to even start diagnosing the issue.我不确定我需要在哪里检查我的设置才能开始诊断问题。
Here are the pipeline steps.这是管道步骤。 I create a new stage and then select a template of type (Azure app service deployment)我创建一个新阶段,然后选择类型模板(Azure 应用服务部署)
App type is Function App on Windows应用程序类型是 Windows 上的函数应用程序
Give the app name, resource group , give the slot and package folder as给应用程序名称,资源组,给插槽和包文件夹作为
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
Everything else on this is left as default.其他所有内容都保留为默认值。
Azure function app deploy and release pipeline error Azure 函数应用部署和发布管道错误
According to the error message:根据错误信息:
Deployment of msBuild generated package is not supported.不支持部署 msBuild 生成的包。 Change package format or use Azure App Service Deploy task.更改包格式或使用 Azure 应用服务部署任务。
It seems you are not using the correct task to publish the generated package.您似乎没有使用正确的任务来发布生成的包。 Since the generated package is .zip
, you can try the suggestion as error message said use Azure App Service Deploy task.由于生成的包是.zip
,您可以尝试建议作为错误消息说使用 Azure 应用服务部署任务。
Azure App Service Deploy task : Azure 应用服务部署任务:
Use this task in a build or release pipeline to deploy to a range of App Services on Azure.在生成或发布管道中使用此任务部署到 Azure 上的一系列应用服务。 The task works on cross-platform agents running Windows, Linux, or Mac and uses several different underlying deployment technologies.该任务适用于运行 Windows、Linux 或 Mac 的跨平台代理,并使用多种不同的底层部署技术。
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and Node.js based web applications.该任务适用于基于 ASP.NET、ASP.NET Core、PHP、Java、Python、Go 和 Node.js 的 Web 应用程序。
The task can be used to deploy to a range of Azure App Services such as:该任务可用于部署到一系列 Azure 应用服务,例如:
Web Apps on both Windows and Linux Windows 和 Linux 上的 Web 应用程序
Web Apps for Containers Function容器功能的 Web 应用程序
Apps on both Windows and Linux Windows 和 Linux 上的应用程序
Function Apps for Containers容器功能应用
WebJobs网络工作
Apps configured under Azure App Service Environments在 Azure 应用服务环境下配置的应用
Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.查看此博客Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS了解更多详细信息。
Hope this helps.希望这可以帮助。
I get predefined pipeline from VS integration.我从 VS 集成中获得了预定义的管道。 So for those you have the same case:所以对于那些你有同样情况的人:
I have more than one project (web api + azure function) in my solution.我的解决方案中有多个项目(web api + azure 函数)。 For the web app I used the zip file, but for the azure function to work I needed to publish the whole folder.对于 Web 应用程序,我使用了 zip 文件,但要使 azure 功能正常工作,我需要发布整个文件夹。
Azure Function Package or folder: $(System.DefaultWorkingDirectory)/_Backend/drop Azure 函数包或文件夹:$(System.DefaultWorkingDirectory)/_Backend/drop
Web Api Package or folder: $(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip Web Api 包或文件夹:$(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.