I have a project that has 2 roles - ‘media-server’, ‘web-server’. N web servers share the resources on a media server - they write files to a mapped network drive. Part of the deployment steps for a media-server is to create the share if it doesn’t exist, and then set the full path to it (including vm-name) to an octopus variable. This works.
The problem I have is using this variable in a web.config transformation… Since the web.config only happens in the context of a ‘web-server’ role, the value that is set from teh media-server role deployment isn’t set. I get the full non-replaced string in my web.config file:
- The step that this occurs in, when I add the ‘web-server’ role to it, it then starts replacing the value correctly.
Is there anyway to set ‘global’ variables so that regardless of where in teh pipeline or what machien role set it, so that it is available to all other steps/machine roles?
Here are two attached log files - ctrl-f to “screenCaptureOutputDirectory” to see how it worked in one, but not the other. The only difference is I run the ‘pointroll-workie’ step for both roles in one, and one role (media-server) in the other.
this-worked.log.txt (48 KB)
no-workie.log.txt (46 KB)
I was trolling the problems forum, and I came across a similar situation - I followed the advice to reference the machine name directly in the step with .Output[machinename].VariableName and that worked fine… but - as is stated in the forum post, this is no bueno. If I wanted to hard code the machine name, I’d just hard code it in the step for referencing the full path of the share… From deployment perspective, this is completely dynamic in nature. I like the machine.any idea here: https://github.com/OctopusDeploy/Issues/issues/1419 and really hope it is implemented soon for these types of situations.
Thanks for the feedback, we’ll try to make sure that suggestion is in the next major release (probably 3.0).