Deploy to azure functions using powershell

前端 未结 5 2171
一生所求
一生所求 2021-02-07 10:20

Is there any way, I can deploy to azure functions using powershell scripts? CI will not work for us because we use octopus deploy to deploy to all of our production services. So

5条回答
  •  执念已碎
    2021-02-07 10:39

    You can also use Azure CLI 2.0 + Azure Function CLI to deploy Azure functions form commandline/powershell

    Azure CLI API can be used to provision a function app, using command

    az functionapp create --name $functionappName --resource-group $resourceGroup --storage-account $storageAccountName --consumption-plan-location $consumptionPlanLocation
    

    And apply application setting

    az functionapp config appsettings set --name $functionappName --resource-group $resourceGroup --settings "test=value"
    

    And Azure Function CLI api can be used to deploy the functions you have

    func azure functionapp publish 
    

    Handy tools!

提交回复
热议问题