I was able to achieve the deployment in 2 steps. First, create a zip package using msbuild:
msbuild FunctionApp.sln /p:Configuration=Release /p:DeployOnBuild=true
/p:WebPublishMethod=Package /p:PackageAsSingleFile=true
/p:SkipInvalidConfigurations=true
/p:DesktopBuildPackageLocation="c:\output.zip" /p:DeployIisAppPath="Default Web Site"
Next, the package should be uploaded to azure blob storage (SAS tokens, etc)
And then, I utilized MSDeploy extension of Azure AppService that downloads the package and deploys it into your Azure Functions service:
{
"apiVersion": "2015-08-01",
"type": "Microsoft.Web/sites",
"name": "[variables('functionAppName')]",
"kind": "functionapp",
"dependsOn": [
...
],
"properties": {...},
"resources": [
{
"name": "MSDeploy",
"type": "extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[concat('Microsoft.Web/sites/', variables('functionAppName'))]"
],
"tags": {
"displayName": "webDeploy"
},
"properties": {
"packageUri": "[concat(parameters('_artifactsLocation'), '/', parameters('webDeployPackageFolder'), '/', parameters('webDeployPackageFileName'), parameters('_artifactsLocationSasToken'))]",
"dbType": "None",
"connectionString": "",
"setParameters": {
"IIS Web Application Name": "[variables('functionAppName')]"
}
}
}
]
},
Make sure Azure Resource manager would be able to access the package!