projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 653 forks source link

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

Closed bgribaudo closed 1 year ago

bgribaudo commented 1 year ago

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 1 year ago

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

drobert-bfm commented 6 months ago

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
  }
}