我面临一个奇怪的问题。我使用Azure DevOps Pipeline版本部署了我的代码-它运行成功,但是该代码未反映在Azure Function App中。
这是我在做什么:
D:\home\site\wwwroot
下找到已部署的zip文件部署日志:
Got service connection details for Azure App Service:'myFuncApp'
Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"}
Updated App Service Application settings and Kudu Application settings.
Package deployment using ZIP Deploy initiated.
Successfully deployed web package to App Service.
App Service Application URL: http://myFuncApp.azurewebsites.net
在Function App Deployment Center选项卡上查看:
Deployed Successfully to production
Source Version 6d9c8340ba Build 20190411.1 Release: 3
Function App端点正在运行(抛出通用的欢迎页面),确认Function App本身运行正常,但是我无法访问我的API。
其他更新
这是作为Azure管道zip部署的一部分上传到d:\home\data\SitePackages
的.zip文件的结构:
/host.json
/package.json
/proxies.json
/package-lock.json
/func_name/index.js
/func_name/function.json
/node_modules/**
相同的代码在本地运行。
注意:当我转到“部署中心”选项卡时,确实看到此错误消息,但是我认为这与通过Function App进行连续部署有关
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure Dev Ops Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
请帮助我。怎么可能出问题了?
答案 0 :(得分:1)
我终于能够解决问题。 @ 4c74356b41为我指明了正确的方向,因为关键问题是包装。
下面是问题:
Azure Functions
。因此,它正在压缩我的压缩文件。 当我删除存档步骤时,避免了双重压缩,它开始起作用。