我正在使用 Azure DevOps 及其 CI/CD 管道。当我将 Windows FunctionApp 部署到插槽时,出现此错误:
2021-05-04T13:10:14.0501876Z ##[error]Failed to deploy web package to App Service.
2021-05-04T13:10:14.0521125Z ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
奇怪的是,当我将同一个发布管道部署到生产环境并且未选中“部署到插槽或应用服务环境”选项时,没有任何问题。由于它对我来说是用于生产环境的,所以这很奇怪...那么有人知道发生了什么吗?
这是来自 kudu 的一小段日志:(我删除了 FunctionApp 的 URI)请注意,这不是完整日志,因为它太大了,无法在此处发布
{
"name":"2021-04-30T07-00-11_d9c8d9_001_Startup_POST_api-zipdeploy_0s.xml",
"size":355,
"mtime":"2021-04-30T07:00:11.9092333+00:00",
"crtime":"2021-04-30T07:00:11.7981538+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-11_d9c8d9_001_Startup_POST_api-zipdeploy_0s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-11_d9c8d9_001_Startup_POST_api-zipdeploy_0s.xml"
},
{
"name":"2021-04-30T07-00-11_d9c8d9_002_POST_api-zipdeploy_202_1s.xml",
"size":2079,
"mtime":"2021-04-30T07:00:13.2111672+00:00",
"crtime":"2021-04-30T07:00:11.9882903+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-11_d9c8d9_002_POST_api-zipdeploy_202_1s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-11_d9c8d9_002_POST_api-zipdeploy_202_1s.xml"
},
{
"name":"2021-04-30T07-00-12_d9c8d9_003_Background_POST_api-zipdeploy_2s.xml",
"size":3653,
"mtime":"2021-04-30T07:00:14.8463405+00:00",
"crtime":"2021-04-30T07:00:12.7048044+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-12_d9c8d9_003_Background_POST_api-zipdeploy_2s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-12_d9c8d9_003_Background_POST_api-zipdeploy_2s.xml"
},
{
"name":"2021-04-30T07-00-20_d9c8d9_006_GET_api-deployments-temp-1de32b26_200_0s.xml",
"size":1538,
"mtime":"2021-04-30T07:00:20.2922484+00:00",
"crtime":"2021-04-30T07:00:20.1491455+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-20_d9c8d9_006_GET_api-deployments-temp-1de32b26_200_0s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-20_d9c8d9_006_GET_api-deployments-temp-1de32b26_200_0s.xml"
},
{
"name":"2021-04-30T07-00-20_d9c8d9_007_GET_api-deployments-temp-1de32b26-log_200_0s.xml",
"size":1684,
"mtime":"2021-04-30T07:00:20.695538+00:00",
"crtime":"2021-04-30T07:00:20.4833857+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-20_d9c8d9_007_GET_api-deployments-temp-1de32b26-log_200_0s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-20_d9c8d9_007_GET_api-deployments-temp-1de32b26-log_200_0s.xml"
},
{
"name":"2021-04-30T07-00-20_d9c8d9_008_GET_api-deployments-temp-1de32b26-log-03c43bf4-58c9-4ec9-b3c4-b703be6a4e0b_200_0s.xml",
"size":1815,
"mtime":"2021-04-30T07:00:21.0507931+00:00",
"crtime":"2021-04-30T07:00:20.8726648+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-20_d9c8d9_008_GET_api-deployments-temp-1de32b26-log-03c43bf4-58c9-4ec9-b3c4-b703be6a4e0b_200_0s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-20_d9c8d9_008_GET_api-deployments-temp-1de32b26-log-03c43bf4-58c9-4ec9-b3c4-b703be6a4e0b_200_0s.xml"
},
{
"name":"2021-04-30T07-00-21_d9c8d9_009_PUT_api-deployments-51619766021863_200_1s.xml",
"size":2182,
"mtime":"2021-04-30T07:00:23.2713857+00:00",
"crtime":"2021-04-30T07:00:22.0114824+00:00",
"mime":"text/xml",
"href":"https://[FUNCTION_URI].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/2021-04-30T07-00-21_d9c8d9_009_PUT_api-deployments-51619766021863_200_1s.xml",
"path":"C:\\home\\LogFiles\\kudu\\trace\\2021-04-30T07-00-21_d9c8d9_009_PUT_api-deployments-51619766021863_200_1s.xml"
},
编辑:在支持人员无法帮助我之后,我删除了资源并创建了一个新的 FunctionApp。现在它可以按预期工作了。