Getting published NuGet package names from octo.exe

Hi,

I’m working with Octopus Deploy + Jenkins combo and …

Have a build job that does:
msbuild.exe $SOLUTION /t:Build /p:RunOctoPack=true /p:OctoPackPackageVersion=$MAJOR.$MINOR.$BUILD_NUMBER /p:Configuration=Release /p:OctoPackPublishPackageToHttp=$NUGET_SERVER /p:OctoPackPublishApiKey=$API_KEY

Which triggers a Release and Deploy job:
octo create-release --project=%PROJECT% --deployto=%ENVIRONMENT% --releaseNumber=%PACKAGE_VERSION% --waitfordeployment --server=%OCTO_SERVER% --apiKey=$API_KEY

That works fine, however I would like to ensure (using --package=PackageId:Version right?) that I’m deploying a specific package name and version and not just the latest found from the feed for the project. Is it possible to get the NuGet package names octo.exe published to the internal NuGet server of Octopus that I could then pass on to the downstream job to handle?

Hi Sami,

The --package command format is --package=StepName:Version, not necessarily corresponding to the package ID, though in many cases it will.

I don’t believe theres a simple programmatic way to get this info from the first step, but won’t the $MAJOR.$MINOR.$BUILD_NUMBER combined with your knowledge of the deployment process cover this?

If you hit something you can’t achieve cleanly with Octo.exe, using the API and Octopus.Client NuGet package to write a custom EXE is surprisingly easy. Some docs at: http://docs.octopusdeploy.com/display/OD/Octopus.Client

Hope this helps,
Nick

Thanks Nick. I’ll work around it.