Window service does not accept variables anymore?

Hi Octopus Gurus,

I’ve created a deploy-windows-service on a staging machine (v2018.10.0), which I copied on to a production machine (v2018.10.5 and now v2019.3.0) via the export-import procedure.

The variables I wish to use are set in my pre-deploy script and should be reflected in the windows-service account name.

Unfortunately, the variables I added do not work in the new Octopus versions. As you can see in the attachments the system performs the print-statements of the pre-deploy script, but fails to use the new variables in the Windows Service Name, even though the variables are present in the #{} popup of the Service name.
I’ve set all ‘configure features’ to no avail.

Is this a misconfiguration on my side or something that has changed in the new versions?


V2018.10.0 is fine:

V2018.10.5 & V2019.3.0 do not resolve the variable in the service name:

Process Deploy Service configuration:

Popup shows the variable:

Pre-deployment script sets the variable:

Hi Eelko,

Thanks for getting in touch. We’ve had a couple of reports of variable scopings being dropped when doing import into another server. Could I get you to check what variables exist in the original server and the new one, and what scopes the variables have?

The variables will be left in the values, as you are seeing, if Octopus can’t find a variable in the scope, which is what I suspect is happening.


Hi Shannon!

Your remark pointed me in the right direction. Indeed I missed the correct scoping for the new environment in the project variables. I adjusted all other environment settings, but I missed that one.

I thank you!


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