Is there an easy way to reference the version of a package in the current release from a deployment step for a different package? eg. I have a Website.nupkg that needs to know the version of WebsiteAssets.nupkg when the deployment executes.
Currently I am using an output variable in the first package deployment that stores the value and then I reference the same variable in later stages where required. This approach works however, it is very problematic if someone chooses to skip the steps that store the output variables.
Thanks for reaching out. Output variables would be the way to go. When you say you a “storing the value in the first package step” do you mean you are creating your own variable using New-OctopusVariable and then using it from another step? I’m asking because we already have a built-in output variable for that during the deployment:
Given a deployment process like the one on the attached screenshot, you can get the pacakage version using the variables