I have simple requirement that I can achieve in Azure DevOps and other release management systems but seems to be actively prevented in Octopus Deploy.
I want to run an ARM Template deployment step using Parameter substitution. This is supported out of the box for variables saved into the project before creation, but I want to determine the value of a variable as a result of a script and then use that variable as one of the substitutions.
In ADO I can do the following to save a variable value into the scope of the release
Write-Host "##vso[task.setvariable variable=Colour]Green"
In Octopus I have SetVariable - but bizarrely it has the scope of the current step only, which is not much use.
I can use
[Environment]::SetEnvironmentVariable("colour","green","machine")
But this will not be read by the ARMS substitution mechanism
How can I set a variable to use in a subsequent step?