There are 10+ project in my solution. One project has config, name Variable.release.config file which has all the application variable, connection string and other web.config's module which needs to replaced with Azure variable from Library. This config file is used by all the project. The solution has Asp.net MVC website which has it's own web.config, web.release.config. I am trying to xml transform variable from Variable.release.config, It is transforming everything in web.config but value of endpoint variable in client section of endpoint address is not getting replaced.
Previously I was using Azure App Service Deploy and following is its YAML:
steps:
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy: abc-tst'
inputs:
azureSubscription: 'ABC Technologies(XXXX-XXX-XXX-XXX-XXXXXX)'
WebAppName: 'ABC-tst'
deployToSlotOrASE: true
ResourceGroupName: 'abc-tst'
SlotName: T2
packageForLinux: '$(System.DefaultWorkingDirectory)/$(Release.DefinitionName)/drop/ABC.Frontend.zip'
enableXmlTransform: true
enableXmlVariableSubstitution: true
It was not replacing variable in endpoints. I came across several article that says only endpoint can not be replaced with xml transformation I need to use 3rd party tools to transfer Replace Token
I tried with following steps:
- File transform
- Replace Token
- Azure App Service Deploy
But it didnt replaced endpoint variable address in web.config though it xml transformed was success and in logs Replace token has replaced the token of that variable.
After that I modified my release task as given in bellow image after reading this answer.
Is there any way to replace variable value in endpoint address or am I missing anything?