We have an application.config that for reasons has an xml element who’s value is actually yaml text. The inline editor allows this to be added as a multi line block of text, but by the time it is deployed onto a target the line breaks have been lost, and its a single line, which breaks the yaml.
Should I be using special chars / escape chars to manage this or is this the same bug/behaviour as described in the 5687 issue. If so, is there a fix date?
Thanks for reaching out - this sounds unfortunate. Are you able to provide a specific example of the variable you’re using, as well as what deployment feature (Structured Configuration Variables, Substitute Variables in templates, .Net XML Transforms etc.) you’re using to replace the values?
I’ll dig into this and get an issue raised for triage by the team!
then create a YAML variable in the project using the editor so it definitely saves as multiline, with some similar but modified content to the original:
Thanks for providing that great extra bit of information. I was able to reproduce this locally using the same information, and wanting to have a bit of a closer look at this one. However a quick test using the Substitute Variables in Templates feature instead of .NET Configuration Variables substituted the multi-line variable value into the config file correctly. This approach requires you to change to the config file to use the substitution syntax (e.g. <add key="YAML" value="#{VariableName}" />) so not sure it’ll help, but thought I’d throw it out there in case it does.
Thanks Kenneth. We might be able to do something in our build pipeline to insert the substitution string before it creates the nuget package that gets uploaded to Octopus, so thats potentially a viable workaround with a little creativity