I tried so much to search on this but I was still unclear and there is no post with the requirement as I have. I'm doing the swap slot using AzureAppServiceManage@0 but after this action, I want to change the values of a few parameters in the web.config, is there a good way of dealing with this? If I have to trigger a powershell task, it shows the path doesn't exist, how can I directly get to the app service and change the value?
- job: swapone
steps:
- task: AzureAppServiceManage@0
inputs:
azureSubscription: 'subscrip1'
Action: 'Swap Slots'
WebAppName: 'xxx-one-swapslottest-67'
ResourceGroupName: 'xxx-one-rgtest-67'
SourceSlot: 'staging'
SwapWithProduction: true
PreserveVnet: true
You can use Kudi VFS api to
PUT
the file to app service kudu. Need to passIf-Match: "*"
header in the script.For example, I have a web.config on app service kudu:
I put the newweb.config in repo, and would like to update the dll file name(add test) in argument:
In DevOps pipeline, add a
azure powershell
task with sample script below, note to get the newweb.config with-Raw
to keep the xml format.You can find similar answer in ticket here.