Hello,
As part of a deployment I am designing, I am implementing a manual intervention step. Part of this step is creating a manual backup of the existing application, as this is the first time that Octopus is being used to deploy this application. Being I am replacing the existing deployment model with this, I want a ‘rollback’ set up to be able to fall back on if something goes wrong.
I’m doing this with a powershell script. This script varies per environment. All I’d like to do in the deployment plan is to call out the environment name, and the script path in our source control to execute to handle the backup. The script would then be run in the console window to handle the backup. I’d like the message to be updated per environment with variable substitution by Octopus. While it works a bit… part of it does not. It seems that project variables are not being replaced, but Octopus variables are. See this message set up in the Manual Intervention step:
Run the following Powershell script in the Octopus script console to back up the current #{Octopus.Environment.Name} version of the admin application: #{RollbackScriptName}
When the deployment is run, the message becomes this:
Run the following Powershell script in the Octopus script console to back up the current DEV version of the admin application: #{BackupScriptName}
The ‘DEV’ text was clearly replaced by using the variable #{Octopus.Environment.Name} - but as you can see, the variable name #{BackupScriptName} still exists in the message. This variable is a local project variable and for whatever reason, doesn’t get replaced when the deployment is run.
Obviously, the Octopus variable was substituted here. So, does variable replacement work with custom variables in this step, or only built-in Octopus variables?