Updating Variables

Hey there, we have a problem in our company where we need to update a variable in a certain step, so that this variable can be used in a later step in the pipeline. I was able to update the variable and could see the new value in the Variables section in Octopus deploy portal, but the old value of the variable was used in the later step in the process. I guess the variables were loaded when the release was created and didn’t pick up the change for the current release.

Is there a way to fix this issue?

My exact scenario is as follows:
1- Create a storage account on Azure
2- Generate a SAS token from the storage account
3- Update an Octopus Deploy variable with the SAS token value
5- Create an Azure LogicApp injecting the variable value into it

I would be thankful if you can point me how to solve this blocker issue


Hi Fadi,

Thanks for getting in touch! You need to set an Output Variable. No other variables are preserved between steps.

You can also use the Print Variables variable to debug the problem.

If this does not work, could you send us:

  • The code snippet where you are setting the variable
  • A screenshot/code snipit of where you are using it
  • A deployment log
  • A screenshot of the deployment overview page

Hope that helps!

Robert W

Hi Robert, thanks for your fast response. Your answer seems promising, I will check it out and get back to you in case of any issues.