【问题标题】:Github actions Azure deployment python appGithub 操作 Azure 部署 python 应用
【发布时间】:2021-04-13 11:49:15
【问题描述】:

我想部署一个 app 函数,它将创建一个 python 函数(函数代码在 repo 中)。我出现了存储帐户错误。

enter image description here

我的仓库:https://github.com/Palme240/GitHub-Ci-CD

【问题讨论】:

  • 在您的函数配置中,您是否有一个名为 AzureWebJobsStorage 的设置,其中包含与您的存储帐户的连接字符串的值?

标签: azure azure-functions github-actions


【解决方案1】:

在 ValidateAzureResource 请求 Azure 资源时,获取 Function App 设置:AzureWebJobsStorage 不能为空

根据报错信息,需要检查app设置配置中AzureWebJobsStorage属性是否为空。

属性AzureWebJobsStorage 必须在站点配置中指定为应用设置。

Azure Functions 运行时使用AzureWebJobsStorage 连接字符串来创建内部队列。未启用 Application Insights 时,运行时使用 AzureWebJobsDashboard 连接字符串记录到 Azure 表存储并为门户中的“监视器”选项卡供电。

这些属性在siteConfig 对象的appSettings 集合中指定:

"appSettings": [
    {
        "name": "AzureWebJobsStorage",
        "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2019-06-01').keys[0].value)]"
    },
    {
        "name": "AzureWebJobsDashboard",
        "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2019-06-01').keys[0].value)]"
    }
]

详情可以参考官方document

【讨论】:

    猜你喜欢
    • 2020-12-03
    • 1970-01-01
    • 2022-06-30
    • 2020-09-25
    • 1970-01-01
    • 2021-12-19
    • 2022-01-03
    • 2020-10-21
    • 1970-01-01
    相关资源
    最近更新 更多