Bithellio
Bithellio

Reputation: 33

Adding the Octopus build number to a project level variable

I have a project variable of {#ServiceVersion} in one of my config files and i need ot be able to set this to the octopus release number that's stored in the octopus variables.

I've tried the basic PowerShell script that looks something like this:

$ServiceVersion = "$($OctopusParameters['Octopus.Release.Number'])"; 

But that doesnt seem to work.

Upvotes: 1

Views: 924

Answers (1)

ryan.rousseau
ryan.rousseau

Reputation: 1655

To alias an Octopus system variable, you'll need to add it as a variable to your project.

ServiceVersion as a project variable in Octopus

Then you can use the variable with one of the configuration substitution features.

Upvotes: 2

Related Questions