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
In addition to what Chris describes, there is a first class ARM API you can use to deploy functions. Here is what it looks like in PowerShell:
Function DeployHttpTriggerFunction($ResourceGroupName, $SiteName, $FunctionName, $CodeFile, $TestData)
{
$FileContent = "$(Get-Content -Path $CodeFile -Raw)"
$props = @{
config = @{
bindings = @(
@{
type = "httpTrigger"
direction = "in"
webHookType = ""
name = "req"
}
@{
type = "http"
direction = "out"
name = "res"
}
)
}
files = @{
"index.js" = $FileContent
}
test_data = $TestData
}
New-AzureRmResource -ResourceGroupName $ResourceGroupName -ResourceType Microsoft.Web/sites/functions -ResourceName $SiteName/$FunctionName -PropertyObject $props -ApiVersion 2015-08-01 -Force
}
See https://github.com/projectkudu/kudu/wiki/Functions-API for information about the underlying API.