简体   繁体   English

Azure- 函数应用的 zip 推送部署不起作用

[英]Azure- zip push deployment for a function app doesn't work

I am trying to update the code in my App Function from the CLI using the kudu zip push deployment for a function app.我正在尝试使用函数应用程序的 kudu zip 推送部署从 CLI 更新我的App Function的代码。 I am using this command-我正在使用这个命令-

az functionapp deployment source config-zip --name funcApp1 --resource-group MyGroup --src C:\Users\user\Documents\funcApp1.zip

And getting this output-并得到这个输出-

Getting scm site credentials for zip deployment Starting zip deployment. This operation can take a while to complete ... Deployment endpoint responded with status code 202

It looks like it worked but I can't see the updated code in the App Function from the CLI.看起来它起作用了,但我在 CLI 的App Function中看不到更新的代码。 What can be the problem?可能是什么问题?

facing the same issue and I am using below command面临同样的问题,我正在使用以下命令

az functionapp deployment source config-zip -g clitesting4 -n zeroclitrigger --src D:\latestcli\functionapp.zip --build-remote true

I think it is related to either a folder structure or some file missing issue as my runtime is python I am using below folder structure.我认为这与文件夹结构或某些文件丢失问题有关,因为我的运行时是 python 我在文件夹结构下面使用。

__app__
 | - MyFirstFunction
 | | - __init__.py
 | | - function.json
 | | - example.py
 | - MySecondFunction
 | | - __init__.py
 | | - function.json
 | - SharedCode
 | | - myFirstHelperFunction.py
 | | - mySecondHelperFunction.py
 | - host.json
 | - requirements.txt
 tests

all the files I got from vscode .我从 vscode 得到的所有文件。 I am not using any ARM template我没有使用任何ARM 模板

The only thing that worked for us is without using azure pipelines is the command:唯一对我们有用的是不使用 azure 管道的命令:

func azure functionapp publish "<function_name>" --python

docs: Azure Functions Python developer guide - Remote Build文档: Azure Functions Python 开发人员指南 - 远程构建

Seems like you use the wrong command.似乎您使用了错误的命令。

Have a look of this: https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli看看这个: https : //docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli

The command should be:命令应该是:

az functionapp deployment source config-zip -g <resource_group> -n <app_name> --src <zip_file_path>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure- 使用 CLI 更新 Function App 中的函数代码 - Azure- update function code in Function App using CLI Azure App Service连续部署Webhook不起作用 - Azure App Service Continuous Deployment Webhook doesn't work Azure Function 服务总线触发器在部署后不起作用 - Azure Function Service Bus Trigger Doesn't Work After the Deployment TimeoutAttribute 不适用于 Azure 函数应用 - TimeoutAttribute doesn't work for Azure function app 在Azure上部署后授权不起作用 - Authorization doesn't work after deployment on azure "Azure Web 应用容器专用终结点部署不适用于专用终结点容器注册表" - Azure web app container private Endpoint deployment doesn't work with private endpoint container registry 使用 ARM 创建 Azure Function 主机密钥不适用于新部署 - Creating an Azure Function host key using ARM doesn't work on a new deployment Set命令不适用于Azure Kubernetes群集中的部署更新 - Set command doesn't work for the deployment update in Azure Kubernetes cluster Azure function ZIP 部署使用 Z1B1ED905D54C18E3DD87828986C14BE1 - Azure function ZIP Deployment using terraform Azure 应用部署错误:资源不存在 - Azure app deployment error: Resource doesn't exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM