Hey
ENV:
Deploy to Azure Web App
Octopus version: 2018.8.4
Need to figure out why Config Transform in Octopus deployment not working correctly, The result don’t contain the “/” in the end of the url.
Here is the web.config: (Some how, in this post, if line start with “<”, it not shown at all )
appSettings>
add key=“WebApiUrlRoot” value=“https://a1a1a1.domain.co.il/” />
appSettings>
web.dev.config:
appSettings>
add key=“WebApiUrlRoot” value=“https://aaa.domain.co.il/” xdt:Transform=“SetAttributes” xdt:Locator=“Match(key)” />
/appSettings>
Result:
add key=“WebApiUrlRoot” value=“https://a1a1a1.domain.co.il” /> # No “/” in the end of the url
Octopus Log:
Transforming ‘C:\Octopus\Work\20181010121033-11660-9953\staging\Web.config’ using ‘C:\Octopus\Work\20181010121033-11660-9953\staging\Web.Dev.config’.
Warning will be elevated to errors. Prevent this by adding the variable Octopus.Action.Package.TreatConfigTransformationWarningsAsErrors and setting it to false.
Executing SetAttributes (transform line 18, 75)
on /configuration/appSettings/add[@key=‘WebApiUrlRoot’]
Applying to ‘add’ element (source line 8, 6)
Set ‘key’ attribute
Set ‘value’ attribute
Set 2 attributes
Done executing SetAttributes