It looks like your step name is Deploy Frontend and your package is Frontend.
So you’d want to use:
`$test1 = $OctopusParameters[“Octopus.Action[Deploy frontend].Package[frontend].PackageId”]
Thanks for answering, turned out that I had actually written as you suggested - sorry about that.
I fixed the description to avoid further confusion. It did however not fix the issue.
You could try temporarily adding the system variableOctopusPrintEvaluatedVariables with a value of True to your project.
When you create a new release and deploy, the task log will then include all variables available to each step. This might help you identify the correct variable to use.
Can you expand a little more on what you’re aiming to use this variable for?
The reason I ask is that the variable will return the package ID (which would be “frontend”), but that is already being supplied within the variable itself ($OctopusParameters[“Octopus.Action[Deploy frontend].Package[frontend].PackageId”]) so it seems a little redundant.
Once Azure DevOps is finishing a build, Octopus automatically creates a release on each of our repositories (Lets call them Frontend, Backend & Database) in Octopus.
We cant run deploys on these repos in parallel because they for some reason inherit from eachother.
So they need to run one by one.
So we created a main-pipeline which makes the deploy of each repo await eachother.
But deploying the main, means that we use the latest build-package from Azure, but technically, people can still build older branches, so to get around that, I thought of making an Octopus-variable called ExpectedReleaseVersion (call it “2.0.1”)
Then in the powershell-script i just check whether the ExpectedReleaseVersion is contained in the variable Octopus.Action[Deploy frontend].Package[frontend].PackageVersion.
If the last built version is then 2.0.0, then it wont deploy that repo
I dont which of the following variables would actually containt what i need, but thats a problem for later. Right now i just need one of them to output something: