Additional Transforms - Not working, logged or documented?

I’ve been testing the additional transforms feature and unfortunately I am having the following problems:

  • There seems to be a lack of documentation? Also, there is no text that explains the feature in the deployment step, making things more confusing.

  • I specified “#{Octopus.Machine.Name}.#{Octopus.Environment.Name}.config” as an additional transform as a test, but in the log for the deployment I do not see any hint that the transform has been searched for, or run with the results of the transform.

We are looking to use this feature rather than manually switching the config in the pre-deploy step.

On a side note, the label for the input field seems to point to the custom install directory so the focus is wrong when clicking the label.

Cheers,
Michael

Hi Michael,

We’ve got some basic documentation here - http://docs.octopusdeploy.com/display/OD/Configuration+files#Configurationfiles-ConfigurationTransformations - but it would be great to expand it.

Can you please send a screen shot of the configuration from the package step, and the relevant section from your deployment log? The “Raw” log link provides a version that is easiest to copy from.

Many thanks,
Nick

I have been messing around with Additional transforms all morning and I’m not seeing anything working as expected. I assumed that this was a place where I could run a transform not based on the environment alone but, based on the value I passed in from the variables section that would allow me to have finer grain control over what configs would be run based on Environment, Rolls, and all the way down to the machine level. I must be missing something. Like the above post points out this is an under-documented area currently so that adds to the confusion a bit.

Is what we are trying possible with Additional Transforms currently. We are running 2.1.3.1223.

Hi Justin,

Can you share a screenshot of how you’ve configured the transforms, and a screenshot of what your package looks like after extraction showing which transforms you want to run on which targets? I can help you to work out why it isn’t happening.

Paul

It would be nice if we could enter transform xml directly into the web front end.

That way we could do things like:
@@@

<?xml version="1.0"?> @@@

Hi James - the Substitute in Files feature added in 2.3.1 covers the #{File.name} scenario; grabbing 2.4.1-pre is the best way to experience this since we’ve now changed the order of evaluation so that substitution is performed on XDTs before transforming the target.

Know it is not exactly what you have in mind, but might help anyway. Cheers!
Nick

Thanks Nick, I knew I had seen a case for ordering somewhere in the issues log.

That saves me testing the order that substitutions and transformations happen in. I will grab 2.4.1 and try it.

Just to be clear as of 2.4.1 the order will be:

Substitutes -> Transformations -> Config Variable Updates

James - yes, that’s correct. The full ordering is documented here: http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering

Regards,
Nick

Hi!
I have same issue. I have LoggingConfiguration.config which is used in development. Part of that file is:

 <listeners>
    <add name="Exception" 
      fileName="c:\hpexceptions\exceptionsDefault.log" 
      rollSizeKB="1024" timeStampPattern="MM-dd-yyyy" traceOutputOptions="Callstack" />
  </listeners>

I want fileName to change depending on environment.
My environment is called “Continues Integration”.

So, I created LoggingConfiguration.Release.config with a content:

<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations 
     see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<loggingConfiguration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <listeners>
    <add name="Exception"
      fileName="#{LogFileUrl}" 
      rollSizeKB="1024" timeStampPattern="MM-dd-yyyy" traceOutputOptions="Callstack"
      xdt:Transform="Replace" xdt:Locator="Match(name)"
      />
  </listeners>
</loggingConfiguration>

I want fileName to have value from variable list like shown below in images.
What am I doing wrong?

How can I keep initial file path for development (Git) *fileName=“c:\hpexceptions\exceptionsDefault.log” *
And replace the value in same config file and use another path configured in Variables?

Thank you!

12345.png