1

I'm trying to learn about deployment slots.

I have an Azure Function with a production slot. I already have the function deployed to production slot using the following yaml task:


- task: AzureFunctionApp@1
  displayName: 'deploy ${{ parameters.name }} function app'
  inputs:
    appType: 'functionapp'
    azureSubscription: ${{parameters.serviceConnection}}
    appName: '${{ parameters.solutionAbbreviation }}-app-${{ parameters.environmentAbbreviation }}-${{ parameters.name }}'
    Package: '${{ parameters.root }}/function_packages/${{ parameters.name }}.zip'
    deploymentMethod: 'runFromPackage'
    resourceGroupName: '${{ parameters.solutionAbbreviation }}-app-${{ parameters.environmentAbbreviation }}'

I made some updates to the Azure Function (added a log) and updated the yaml task in order to deploy to the staging slot:

- task: AzureFunctionApp@1
  displayName: 'deploy ${{ parameters.name }} function app (staging)'
  inputs:
    appType: 'functionapp'
    azureSubscription: ${{parameters.serviceConnection}}
    appName: '${{ parameters.solutionAbbreviation }}-app-${{ parameters.environmentAbbreviation }}-${{ parameters.name }}'
    Package: '${{ parameters.root }}/function_packages/${{ parameters.name }}.zip'
    deploymentMethod: 'runFromPackage'
    deployToSlotOrASE: true
    slotName: 'staging'
    resourceGroupName: '${{ parameters.solutionAbbreviation }}-app-${{ parameters.environmentAbbreviation }}'

The only change I made to the yaml task for deploying to the staging slot is to add two parameters:

deployToSlotOrASE: true

and

slotName: 'staging'

And I disabled the Azure Function in staging slot. After deployment, I see the changes I made from the function in production slot. What am I missing? My understanding is that the changes will be deployed to staging slot and only after swap it will deployed to production slot.

user989988
  • 3,006
  • 7
  • 44
  • 91

1 Answers1

1

Just a far-fetched guess, but check if you haven't got "auto swap" enabled in the slot:

enter image description here