Performing variable substitution - Not Updating my file with Values

Hi,

My Variable Substitution is not working.

C:\Program Files (x86)\Pro Med\PRISM\PRISM Cloud\Settings.ini
that’s my setting for target file.

This is what the log file says:
11:49:39 Verbose | Performing variable substitution on ‘C:\Program Files (x86)\Pro Med\PRISM\PRISM Cloud\Settings.ini’
11:49:39 Verbose | Installing package to custom directory C:\Program Files (x86)\Pro Med\PRISM\PRISM Cloud
11:49:39 Info | Copying package contents to ‘C:\Program Files (x86)\Pro Med\PRISM\PRISM Cloud’
11:49:40 Info | Copied 2 files

But the Settings.ini does not update with the Variables

[Settings]
DirectConnection=#{DirectConnection}
DBServer=#{DBServer}
DBPort=#{DBPort}
DBName=#{DBName}
DBUserName=#{DBUserName}
DBPassword=#{DBPassword}
Protocol=#{Protocol}
SSLCACert=#{DB_SSL_CA}
SSLCert=#{DB_SSL_CERT}
SSLKey=#{DB_SSL_KEY}
SSLCipherList=#{SSLCipherList}
Compress=#{Compress}
Port=#{Port}
LogConnection=#{LogConnection}
LogError=#{LogError}
LogTrace=#{LogTrace}
Buffer=#{Buffer}

Please Advise.
Regards
Kiran B

Hi Kiran,

Thanks for getting in touch!

If the variable substitution wasn’t locating the relevant variables it would generally log a message about that.
e.g.

12:51:01   Verbose  |       Performing variable substitution on 'C:\Octopus\Applications\Cloud Poll\Dev\settings\1.0\settings.ini'
12:51:01   Verbose  |       Parsing file 'C:\Octopus\Applications\Cloud Poll\Dev\settings\1.0\settings.ini' with Octostache returned the following error: `The following tokens were unable to be evaluated: '#{DirectConnection}', '#{DBServer}', '#{DBPort}', '#{DBName}', '#{DBUserName}', '#{DBPassword}', '#{Protocol}', '#{DB_SSL_CA}', '#{DB_SSL_CERT}', '#{DB_SSL_KEY}', '#{SSLCipherList}', '#{Compress}', '#{Port}', '#{LogConnection}', '#{LogError}', '#{LogTrace}', '#{Buffer}'`

The ordering of the actions in your log seems to be off. It is replacing the variables within the settings.ini file in the custom install folder and then copying the contents of the package into that location.

I think the Target Files field within your step might be misconfigured. If you added the full file path of the custom directory to that field, it would explain the odd behaviour.

Would I be correct in thinking you have something like this configured?

If so, you’ll want to update that to something like:

The reasoning is that the order of operations extracts the package to the Tentacle home folder (default C:\Octopus\Applications), performs the variable substitution on the files there and then copies the entire contents to the custom installation directory.

Regards,
Paul

1 Like

Hi Paul,

You are a star … thank you soo much.
Been puzzling with this all day.
My Settings.ini is updating now.

Much Appreciated.

Regards
Kiran

Awesome, glad to hear that’s working.

Was a bit of a head-scratcher until I noticed the ordering.

Let us know if you run into any other issues.

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