How do I choose a package version when creating a release with Octo.exe and build server plug-ins?

(Ryan Rousseau) #1

When creating a release from the Octopus UI, the package selection defaults to the latest (highest version) package available. You do have the option to select an older package version.

When creating a release with Octo.exe or one of the build server plug-ins that use Octo.exe under the hood, you can also specify what package versions to use.

There are a few ways to select the package detailed on the documentation page for create-release.

If you want to specify a package version for all packages in the release, you can use the --packageVersion option.

octo create-release --project HelloWorld --version 1.0.3 --packageVersion 1.0.1 --server http://octopus/ --apiKey API-ABCDEF123456

To specify a version for a specific step, use the --package option.

octo create-release --project HelloWorld --version 1.0.3 --package StepA:1.0.1 --package StepB:1.0.2 --server http://octopus/ --apiKey API-ABCDEF123456

If you’re creating the release through a build server plug-in, you can use an additional arguments field to provide the parameters. For example, in Azure DevOps, you can specify the package version under Additional Options > Additional Octo.exe Arguments.