Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure function app deploy and release pipeline error

I pushed my .net core function application using visual studio and now setting up release pipeline. I can publish and execute the application just fine and it works great on the Azure portal. However when I see the builds for releases in azure-devOps that slot fails with the following error.

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)

Under tasks

App type is Function App on 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.

like image 808
Sarah Avatar asked Jun 20 '19 16:06

Sarah


People also ask

How do you release an azure pipeline?

Go to the Pipelines tab, and then select Releases. Select the action to create a New pipeline. If a release pipeline is already created, select the plus sign ( + ) and then select Create a release pipeline. Select the action to start with an Empty job.

How do I run a release pipeline in debug mode?

Run a release in debug modeDebug with the value true to the Variables tab of a release pipeline. To initiate debug mode for a single stage, open the Configure stage dialog from the shortcut menu of the stage and add a variable named System. Debug with the value true to the Variables tab.


1 Answers

Azure function app deploy and release pipeline error

According to the error message:

Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task.

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.

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

Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.

Hope this helps.

like image 160
Leo Liu-MSFT Avatar answered Sep 18 '22 22:09

Leo Liu-MSFT