Javascript transformation

Hi this 4th time i am posting , still i didn’t hear back from your side as its affecting my client side work,. And its affecting of client side business.
Please tell me i when can i expect anser

I need help in Transforming JavaScript files using Powershell script in Octopus.

Below are the Steps i have done for transforming. but it’s not happening.

Wrote powershell script to replace value with Env value.
“(Get-Content ($GlobalConfigurationFile)) | ForEach-Object {$_.replace(‘localhost’, ‘#{environmentwebbinding}’).replace(‘’, ‘#{environmentwebbinding}’)} | Set-Content -Encoding UTF8 ($GlobalConfigurationFile)”
In this case, the value of “localhost” need to change to “Env” Value which was specified in Octopus variables.

I’m not using “Substitute variables in files” feature for Transformations. Because, i’m not doing Package Deployment.

Please look attachment for script which i’m using and help me out to fix this issue asap.
if possible, i would like to have call with u guys.

Is there any possible way to reach any one of u guys.

Hi Siddhartha,

Thanks for following up! I’m sorry about the delay in getting back to you. My colleague responded to who I assume is your colleague who raised the same question and attached the same substitution script file. If you haven’t seen his reply, you can do so here. :slight_smile:

We’ve tested out your substitution script which worked just fine, so we’ve asked to double check the paths, and to attach the task log if you’re still hitting errors. The following doc page outlines how to produce and export the verbose log.

I look forward to hearing back, either here or on the other thread! I hope this helps get you going. :slight_smile:

Best regards,


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