I am working on the deployment of the function apps through Azure devops pipeline . I am using like following in order to deploy the pipeline :
- task: AzureCLI@2
displayName: 'Deploy function'
inputs:
azureSubscription: ${{parameters.serviceConnection}}
scriptType: 'ps'
scriptLocation: 'inlineScript'
inlineScript: |
az webapp deployment source config-zip -g $(resourceGroup) -n $(functionAppName) --src $(Pipeline.Workspace)\adx-integration-build\drop\azure-function\Integration.zip --subscription $(Subscription) --verbose
This is working fine but when I am deploying the code in the azure , then old functions (functions deployed earlier ) are not getting removed . I would like to know if there is any way to remove all unnecessary functions from function app during deployment using Azure pipelines.
Note : We have an option to remove all the functions and then deploy the functions from visual studio but I want to do it from Azure pipeline .