Setting up global variables while process running

Hello everyone,
I’m facing a problem that seems to have no solution: in my project, when I make a deploy, I need to alternate the folder of destination for each release.
In order to do this, my idea was to set up a project variable which contains the information about the running directory. When the script launches has to read and change this variable. (i.e.: release 0.5.3, variable “destination”=0, deploy to destination 1, set variable destination=1; release 0.5.4, variable “destination”=1, deploy to destination 0, set variable destination=0).
I tried so many ways, but without success.

Does a solution exists for this?
Thanks in advance for any reply.

Hi Michele,

Thanks for getting in touch! You could create a variable using Set-OctopusVariable and then use it on the subsequent steps. The logic to set the variable value would be up to you (i’m assuming you got that part figured :slight_smile: )

Check this blog post for more info on how to use it.

Hope that helps!

Dalmiro