I need to run a script (powershell or regular DOS) after deployment which basically copies one file to another location.
(the file being copied will be different for each environment we deploy to).
I cannot find a way to determine where my application will be deployed. I’ve looked at executing PostDeploy.ps1, using the “built in post deploy” powershell script editor within an Octopus Deploy Process as well as adding in another step in the process simply to run a powershell script.
Either my scripts are not running (the separate postdeploy.ps1 I don’t believe is running) or the scripts cannot find the environment variables ($OctopusParameters) I’m expecting.
In reality my apps will be installed on E:\approot\app… but when I try (say from the builtin postdeploy editor in OD) specify a line such as:
write-host $OctopusParameters[‘Octopus.Action[web azure].Output.Package.InstallationDirectoryPath’]
I’ve tried many variables, only very very few come back with any content.
Can someone explain where I’m going wrong?
the result is nothing.