1

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.

Bithellio
  • 23
  • 7
  • 1
    Tell us what happened when running your code. _"doesnt seem to work"_ does not provide any information. Error messages? Please post these in your question as well. – Theo Jul 12 '21 at 08:37

1 Answers1

1

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.

ryan.rousseau
  • 1,595
  • 1
  • 11
  • 22