projectkudu/kudu

Using ARM/bicep to set up CD from Azure DevOps -> Azure Function

bgribaudo opened this issue · 2 comments

Hello,

This project's wiki links to Microsoft docs on Publishing a website from Source Control which describes how to use the Azure Portal to set up continuous deployment for Azure App Services from Azure DevOps. Pretty much the same instructions apply to Azure Functions...and it works great!

However, I'd like to set up the CD configuration using Azure Resource Manager (ARM)/bicep templates instead of by manually going into the Azure Portal.

Wonder if I'm missing just a little bit on getting this working. Anyone know of a good a tutorial/blog post/resource describing how to do this?

Poking around with things, I've tried:

resource sourcecontrol 'Microsoft.Web/sites/sourcecontrols@2022-03-01' = {
  parent: functionApp
  name: 'web'
  properties: {
    repoUrl: 'https://***@dev.azure.com/**/**/_git/SomeName'
    branch: 'main'
    isManualIntegration: false
  }
}

This gets me close....but not quite there. In the deployment center, the Azure Portal reports the source as 'External Git' instead of the expected 'Azure Repos' and no builds are triggered on commit.

Thank you,
Ben

jvano commented

Hi

Please file incidents in Azure, so we can better track and assist on this case:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

Thanks,

Joaquin

Try adding kind: 'azure repos':

resource sourcecontrol 'Microsoft.Web/sites/sourcecontrols@2022-03-01' = {
  parent: functionApp
  kind: 'azure repos'
  name: 'web'
  properties: {
    repoUrl: 'https://***@dev.azure.com/**/**/_git/SomeName'
    branch: 'main'
    isManualIntegration: false
  }
}