Configuration transform and [env:"CalamariWorkingDirectory"]

Hey

  1. I am trying to deploy to 2 different configuration to webpps in azure.
    one xdt is web.pre.config and other is web.mobile.config
    I would like to transform web.pre.config to the first web app and web.mobile.config to the second
    I have tried to add web.mobile.config => 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.

Thanks,
Dalmiro

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 web.mobile.config contains different urls keys.
    Anyway I solved it out by removing the checkbox “Run default XML configuration”, and configure
    the additional parameters with web.mobile.config => 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.