We are substiuting variables in our files with filters - #{Octopus.Tentacle.Agent.ApplicationDirectoryPath | Replace “\” “/”}/#{Octopus.Environment.Name}/abc.txt
On some servers it does D:/Octopus/Applicatons/Dev/abc.txt and on others D:/Octopus/Applicatons//Dev/abc.txt
(Notice extra directory separator)
[DB]: Is the same project running on both the working and non-working targets? Is the variable substitution happening on the exact same file? [NA]: Yes, variable substitution is happening in the same file on both working and non-working targets for the same project.
[DB]: Would it be possible for you to share a raw task log with variable logging turned on 2 for a working and non-working target? [NA]: I have attached project json & raw deployment logs. The logs are created for a release, deployed on a working target (L15387) and a non-working target (L30494).
On a high level, the project’s 2nd step (“Set Up Component”) is a PS script step which
Downloads tools-infra-apps-nginx nuget package.
Replaces values in .conf files.
Runs a script present in downloaded nuget.
The contentFiles\nginx.conf contains following-
include #{Octopus.Tentacle.Agent.ApplicationDirectoryPath | Replace "\\" "/" }/#{Environment}/frontier-nginx-conf/current/nginx.conf;
On L15387 - D:/Octopus/Applications/Dev/frontier-nginx-conf/current/nginx.conf; L30494 - D:/Data/Octopus/Applications//Dev/frontier-nginx-conf/current/nginx.conf;
Thanks,
Nikhil
p.s. Thanks for this cool trick of turning on variable logging and exporting the task log. Learning something new about Octo every day.
In the Tentacle.config file (located in the Home Directory defined in Tentacle Manager under a folder with the Tentacle’s name), the Tentacle.Deployment.ApplicationDirectory key defines this value. I tested and confirm that you may change the value, stop the tentacle service, then restart the tentacle service to make the change take effect with no changes in Octopus Server.