How to get current NuGet pkg versions for full/partial release channels?

Hello,

I am implementing the recommended model for full and partial releases of multiple NuGet package components: one channel for all components, and additional channels for individual components.

If a full release of three NuGet components (A,B,C) is followed by a partial release (A only), the deploy steps for B and C are rightly skipped in the partial release, but is there an easy way to determine the last/currently deployed NuGet package versions of the B and C components?

I have been using the Octopus.Action[StepB].Package.NuGetPackageVersion variables, but when the deploy step is skipped in a channel, those values never get set. Likewise, Octopus.Tentacle.PreviousInstallation.PackageVersion is empty.

Either via variable or API, is there a way to determine a Tentacle’s current package version if it is not currently being deployed?

Thank you!
Phil

Hi Phil,

Thanks for reaching out. Octopus doesn’t exactly track whats currently installed on the Tentacle. What it does track is the following:

  • Which was the package version deployed for Project X on Environment X on the latest (or specific) release. You can get this information using the API or the Octopus Client for .NET

  • Which package versions were installed on a specific Tentacle. This information is stored on the DeploymentJournal.xml file on each Tentacle. You would need to have access from each Tentacle to the rest of the Tentacles to check this info during the deployment.

Another way to get the package used on the latest release to a specific environment would be using the Octoposh module (OSS Project site) with the below snippet:

$project = "Consoleapp"

$environment = "Development"

$latestRelease = Get-OctopusRelease -ProjectName $project -Latest 1

$latestDeployment = Get-OctopusDeployment -ProjectName $project -ReleaseVersion $latestRelease.ReleaseVersion | ?{$_.EnvironmentName -eq $environment}

$latestDeployment.Package

This would return something like this:

Name: Testapp
Version: 1.0.15

Hope that helps,
Dalmiro