Azure 函数应用程序部署和发布管道错误
Azure function app deploy and release pipeline error
我使用 visual studio 推送了我的 .net 核心功能应用程序,现在正在设置发布管道。我可以很好地发布和执行应用程序,它在 Azure 门户上运行良好。但是,当我在 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
我不确定我需要在哪里检查我的设置才能开始诊断问题。
以下是流水线步骤。
我创建了一个新阶段,然后 select 类型的模板(Azure 应用服务部署)
正在执行任务
应用类型是 Windows
上的功能应用
给应用名称,资源组,给插槽和
包文件夹为
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
此处的其他所有内容均保留为默认值。
Azure function app deploy and release pipeline error
根据报错信息:
Deployment of msBuild generated package is not supported. Change
package format or use Azure App Service Deploy task.
您似乎没有使用正确的任务来发布生成的包。由于生成的包是 .zip
,您可以尝试使用 Azure App Service Deploy 任务的错误消息中的建议。
Azure App Service Deploy task:
Use this task in a build or release pipeline to deploy to a range of
App Services on Azure. The task works on cross-platform agents running
Windows, Linux, or Mac and uses several different underlying
deployment technologies.
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and
Node.js based web applications.
The task can be used to deploy to a range of Azure App Services such
as:
Web Apps on both Windows and Linux
Web Apps for Containers Function
Apps on both Windows and Linux
Function Apps for Containers
WebJobs
Apps configured under Azure App Service Environments
查看此博客 Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS 了解更多详细信息。
希望这对您有所帮助。
我从 VS 集成中获得了预定义的管道。所以对于那些你有相同情况的人:
- 处于GUI/Classic模式发布页面->编辑管道
- 在阶段部分编辑任务(这负责部署)
- 将
Azure Web App
任务替换为 Azure App Service deploy
我的解决方案中有多个项目(web api + azure 函数)。对于 Web 应用程序,我使用了 zip 文件,但为了使 azure 功能正常工作,我需要发布整个文件夹。
Azure 函数
包或文件夹:
$(System.DefaultWorkingDirectory)/_Backend/drop
网络Api
包或文件夹:
$(System.DefaultWorkingDirectory)/_后端/drop/ClientAPI.zip
我使用 visual studio 推送了我的 .net 核心功能应用程序,现在正在设置发布管道。我可以很好地发布和执行应用程序,它在 Azure 门户上运行良好。但是,当我在 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
我不确定我需要在哪里检查我的设置才能开始诊断问题。
以下是流水线步骤。 我创建了一个新阶段,然后 select 类型的模板(Azure 应用服务部署)
正在执行任务
应用类型是 Windows
上的功能应用给应用名称,资源组,给插槽和 包文件夹为
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
此处的其他所有内容均保留为默认值。
Azure function app deploy and release pipeline error
根据报错信息:
Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task.
您似乎没有使用正确的任务来发布生成的包。由于生成的包是 .zip
,您可以尝试使用 Azure App Service Deploy 任务的错误消息中的建议。
Azure App Service Deploy task:
Use this task in a build or release pipeline to deploy to a range of App Services on Azure. The task works on cross-platform agents running Windows, Linux, or Mac and uses several different underlying deployment technologies.
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and Node.js based web applications.
The task can be used to deploy to a range of Azure App Services such as:
Web Apps on both Windows and Linux
Web Apps for Containers Function
Apps on both Windows and Linux
Function Apps for Containers
WebJobs
Apps configured under Azure App Service Environments
查看此博客 Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS 了解更多详细信息。
希望这对您有所帮助。
我从 VS 集成中获得了预定义的管道。所以对于那些你有相同情况的人:
- 处于GUI/Classic模式发布页面->编辑管道
- 在阶段部分编辑任务(这负责部署)
- 将
Azure Web App
任务替换为Azure App Service deploy
我的解决方案中有多个项目(web api + azure 函数)。对于 Web 应用程序,我使用了 zip 文件,但为了使 azure 功能正常工作,我需要发布整个文件夹。
Azure 函数 包或文件夹: $(System.DefaultWorkingDirectory)/_Backend/drop
网络Api 包或文件夹: $(System.DefaultWorkingDirectory)/_后端/drop/ClientAPI.zip