Configuration transform and [env:"CalamariWorkingDirectory"]


  1. I am trying to deploy to 2 different configuration to webpps in azure.
    one xdt is web.pre.config and other is
    I would like to transform web.pre.config to the first web app and to the second
    I have tried to add => web.pre.config in the transformation section, but didnt work properly.

  2. How to use in pre deploy ps script the [env:“CalamariWorkingDirectory”] variable?
    $WorkDir = $OctopusParameters[env:“CalamariWorkingDirectory”] , $OctopusParameters[“CalamariWorkingDirectory”] did work for me.

Hi Ofer,

Thanks for reaching out!

  1. I’m afraid I’m not quite getting what you are trying to do. Is there any chance you can explain it in more detail?

  2. Both $env:OctopusCalamariWorkingDirectory and $OctopusParameters['env:OctopusCalamariWorkingDirectory'] should work from a PS script.


Dear Dalmiro

Many thanks for your reply.

  1. As I’vd described we would like to deploy 2 different configurations to 2 separate webpps in same ENV in azure, mean- same code but with 2 different web.config configurations.
    web.pre.config contains some url keys and contains different urls keys.
    Anyway I solved it out by removing the checkbox “Run default XML configuration”, and configure
    the additional parameters with => web.config.
  2. Thanks, $OctopusParameters[‘env:OctopusCalamariWorkingDirectory’] - worked for me as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.