Variable reference issue

After upgrading to, a deployment that was working fine previously has begun to fail with errors similar to:

The variable ‘Octopus.Step[4].Package.CustomInstallationDirectory’ contains a reference to another variable named ‘EXAMPLE_VARIABLE’, which is not defined. Set the special variable OctopusPrintVariables to have Tentacle print the value of all variables to help diagnose this problem.

The step this fails on does not have the EXAMPLE_VARIABLE defined for its role as its not applicable. When I removed the role limitation, the step runs fine, but a future step then fails for the same reason.

Is this intended (variables need to be declared for all scopes)?

Hi Derek,

Yes, this is a design issue with the way we resolve variables. The
assumption is that you could set an empty variable with no scope, and then
override it with specific values per scope. You could also set a variable
called “OctopusIgnoreMissingVariableTokens” to “true” to ignore these
errors in future.

In our next release I’ll try to find a better way to handle these kinds of


Paul Stovell
Octopus Deploy
W: | T: @octopusdeploy