Reference Release version number


I have a problem with referencing deployment version number from 1 environment to another by powershell script. For example I want to get number of release 0.0.1 from Staging and implement it in the code on Internal Test Environment. Is it possible?

Thank you in advance.

Hi Oleg,

Thanks for getting in touch! I’m sorry for the delay in responding to you. From what I can gather you are trying to achieve, I don’t think this is something that can work out of the box in Octopus. I may need a bit more information about what you are trying to achieve here, are these deployments all in the same release? If so, you can use the System Variable #{Octopus.Release.Number} to reference the current release number for your deployment. However, if you are trying to reference one release number in a different release, you will not be able to do so with this variable. You will need to use the API to find the release and in the script create variable with its value. The following is a link to our API GitHub examples in case you need to use this method.

However, if this is not what you are after, I will need some further explanation of what you are trying to achieve here. :slight_smile:

Looking forward to hearing from you.

Best regards,