0

When I create release from TeamCity, I specify --packageversion %build.number% as an additional command line argument. Is there a way to read that variable in Octopus Deploy?

Looking at documentation, I've found only one variable containing "packageversion": Octopus.Action.Package.NuGetPackageVersionand it doesn't seem like what I need as it is specific to a step and I want to get a global --packageversion (also known as defaultpackageversion).

SiberianGuy
  • 24,674
  • 56
  • 152
  • 266

1 Answers1

1

If you are driving the release from TC and you are passing in a package version (i.e. there is a nuget package), then this will become your release number.

Looking at the inbuilt system variables, you could use

Octopus.Release.Number

This will also be the number entered when doing a manual deployment.

Octopus System Variables

Hope this helps

Matt
  • 3,684
  • 1
  • 17
  • 19