Transforming configuration file in a Azure Powershell script step

We are deploying an Azure Batch application package using Azure Powershell Script step. We only have this step at the time which it references a package and pushes it to Azure Batch service. Unfortunately the Azure Powershell script doesn’t have any feature configuration to transform the configuration files. However, a plain Powershell script step does have feature configurations and transforms the configuration files but it doesn’t authenticate to Azure and also doesn’t load the Azure modules. Any thought on how to deploy Azure Batch Service Applications?

Thanks in advance for looking into this.

Regards,
Ramin

Hi Ahmad, thanks for getting in touch,

Variable substitution and configuration transforms were enabled as features for the Azure Powershell script as part of 2018.8.5. If upgrading is an option, then this may prove to be the easiest way to achieve what you are looking to do.

The alternative would be to install the Azure powershell modules on the worker machine and adding a script to bootstrap the Azure context manually. You could use the script we use as a starting point. You could also access the Azure account variables from the script as covered in our documentation here.

Regards,
Shaun

Hi Shaun,

Thanks a lot for the suggestions. We upgraded our Octopus to the latest version and solved the problem.

Regards,
Ramin

No problem Ahmad,

Glad to you hear that solved the issue for you. Please let us know if there is anything else we can help with.

Regards,
Shaun