I'm deploying to the Azure Function via yaml pipeline and VS Publish profile, but it's failing the deployment with below non-understandable error.
##[debug]getDeploymentLogs. Data: {"statusCode":200,"statusMessage":"OK","headers":{"content-length":"147","connection":"close","content-type":"application/json; charset=utf-8","date":"Fri, 11 Aug 2023 11:25:43 GMT","server":"Microsoft-IIS/10.0","cache-control":"no-cache","expires":"-1","pragma":"no-cache","x-ms-request-id":"<id>","x-aspnet-version":"4.0.30319","x-powered-by":"ASP.NET"},"body":[{"log_time":"2023-08-11T11:25:38.0464127Z","id":"<id>","message":"Fetching changes.","type":0,"details_url":null}]}
**Fetching changes.**
##[error]Failed to deploy web package to App Service.
##[debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to App Service.
##[warning]Can't find loc string for key: KuduStackTraceURL
##[debug]Processed: ##vso[task.issue type=warning;]Can't find loc string for key: KuduStackTraceURL
##[error]KuduStackTraceURL https://$<function-name>:***@<function-name>.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
##[debug]Processed: ##vso[task.issue type=error;]KuduStackTraceURL https://$<function-name>:***@<function-name>.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
##[debug]Deployment Failed with Error: Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
##[debug]task result: Failed
##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
Background - Previously it was working, but I have added ARM deployment for Function App Settings.
"name": "[concat(parameters('<function-name>'), '/', 'appsettings')]",
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-09-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('<function-name>'))]"
],
"tags": {
"displayName": "azwenprd01-devtst-pos-if1101-2-func-AppConfig"
},
But it failed as I used dependsOn for Function App which I'm not deploying through ARM. I removed dependOn and then ARM template got deployed. After this step I have added FunctionDeployment in my yaml pipeline. But after that, Function deployment were failing which was working previously.
Also, I checked all the files on Kudu. I observed that the ZIP is getting deployed under '\data\SitePackages>' but not getting extracted to wwwroot folder. Also the packagename.txt conatians the older .zip name.
Not sure what's causing this issue. Can we do the clean redeploy to Azure Function ? Or how to forcefully deploy to Azure Function ?
WEBSITE_RUN_FROM_PACKAGE is set to 1.