Octo.exe specify multiple different NuGet package versions by id

Hi,

is it possible to specify the NuGet package versions to be used during creation of a release by package ids instead of stepNames?

We have multiple deployment packages we have to provide versions for when we create a release. Some of them ‘live’ in the same Solution and get the same version number during the teamcity build. Others are ‘external’ to the main Solution and therefore in general have different versions than the ones coming from the main Solution. When we create a release manually in OD we have to look up the correct version for the ‘external’ packages in our documentation. We would like to automate the process of release creation.

We plan to have a ‘releaseDependencies.json’ file in source control where we state the versions of the ‘external’ dependencies. Teamcity will then pull this ‘manifest’ and kick off octo.exe to create the release providing the package versions. This file is going to be maintained by developers who do not necessarily will have knowledge of any step names in octopus deploy. Our developers do know the package ids because the .nuspec files are right there in source control. And in the end software does depend on other software, it does not depend on any step names. So I would rather like to see

{
packages: [{
id: “id1”,
version: “3.1.2.3”
},
{
id: “id2”,
version: “3.2.1.3”
}]
}

instead of

{
packages: [{
stepNameInSomeSoftwareWeUseToDeployStuff: “Deploy ServiceA”,
version: “3.1.2.3”
},
{
stepNameInSomeSoftwareWeUseToDeployStuff: “Deploy ServiceB 2016”,
version: “3.2.1.3”
}]
}

Thank You!

David Gutzmann

Hi David,

Thanks for getting in touch.

You can pass package ids to Octo.exe rather than step names:

Octo.exe create-release --package id1:3.1.2.3 --package id2:3.2.1.3

There is more in our documentation on how Octo.exe resolves package versions: https://octopus.com/docs/api-and-integration/octo.exe-command-line/creating-releases#Creatingreleases-Specifyingthepackageversion

I hope this helps.

Cheers,
Shane

1 Like

Hi Shane,

Thank you for the quick reply!

This is exactly what I was looking for! The possibility of providing ids rather than step names is not mentioned in the documentation. You might want to consider adding that piece of information.

Thank you!

David