Octopus fails to pull the correct package versions when more than one package is referenced

I have a deployment configured with multiple steps. The first step in the process attempts to run some Powershell contained in a nuget package that is entirely unrelated to the application being deployed. Unfortunately, Octopus tries to find a version of this (unrelated) package that matches the version of the application’s deployment which does not exist. The build just stalls out looking for a package that does not exist.

Here are sample logs:

=================================
                    | == Running: Deploy Q2.Caas.IdentityVerification.Api.Messaging release 2.1.454 to CaaS - Dev ==
16:56:04   Verbose  |   Guided failure is not enabled for this task
                    | 
                    |   == Running: Acquire packages ==
16:56:04   Info     |     Acquiring packages
16:56:04   Info     |     Making a list of packages to acquire
16:56:04   Verbose  |     Package Q2.CaaS.Infrastructure.Azure v2.1.454 is required by action 'Provision Slot'
16:56:04   Verbose  |     Package Q2.Caas.IdentityVerification.Api.Messaging v2.1.454 is required by action 'Deploy'
16:56:04   Verbose  |     Task Acquire Q2.CaaS.Infrastructure.Azure.2.1.454 on Octopus Server created to acquire Q2.CaaS.Infrastructure.Azure v2.1.454 for action ('Provision Slot')
16:56:04   Verbose  |     Task Acquire Q2.Caas.IdentityVerification.Api.Messaging.2.1.454 on Octopus Server created to acquire Q2.Caas.IdentityVerification.Api.Messaging v2.1.454 for action ('Deploy')
16:56:04   Verbose  |     No packages are required on any deployment targets
                    |   
                    |     Running: Octopus Server
                    |     
                    |       Running: Download package Q2.CaaS.Infrastructure.Azure v2.1.454 from NuGet feed 'Dev Builds'
16:56:04   Verbose  |         Checking package cache for package Q2.CaaS.Infrastructure.Azure v2.1.454
16:56:04   Info     |         Downloading Q2.CaaS.Infrastructure.Azure v2.1.454 to package cache...
16:56:04   Verbose  |         Downloading Q2.CaaS.Infrastructure.Azure v2.1.454 from NuGet feed 'Dev Builds' using cache policy UseCache...
16:56:04   Verbose  |         Downloading package (attempt 1 of 30)
16:56:04   Verbose  |         Attempt 1 of 30: Unable to download package Q2.CaaS.Infrastructure.Azure v2.1.454 from NuGet feed 'Dev Builds': The download package result was: NotFound
16:56:04   Verbose  |         Going to wait 10s before attempting the download from the external feed again.
16:56:14   Verbose  |         Downloading package (attempt 2 of 30)
16:56:15   Verbose  |         Attempt 2 of 30: Unable to download package Q2.CaaS.Infrastructure.Azure v2.1.454 from NuGet feed 'Dev Builds': The download package result was: NotFound
16:56:15   Verbose  |         Going to wait 20s before attempting the download from the external feed again.
...
=================================

Is it possible to tell Octopus to just pull the latest version of Q2.CaaS.Infrastructure.Azure (or even a specified version) rather than just assuming that version 2.1.454 exists because that’s the version of the application being deployed?

My only workaround that I can come up with is to hard-code the Powershell via a script module. If I could source the script module from a nuget feed instead, that would be perfect. Along those lines, I suppose I could theoretically create a script module that itself pulls down the actual nuget containing the Powershell I want, unzip it, install the module, etc. Seems like a lot of work for a workaround, though.

Is there an alternative solution?

Hey David,

Thanks for getting in touch with us, that’s a great question.

I was wondering if it would be possible for you to provide us with a JSON of your process (Project > Process > 3 dots in upper right > Download as JSON)? This will help me fully understand your process on my end.

Also, I have a few questions I hope you don’t mind answering:

  • What is the full name of the package stored in the NuGet feed?

  • Do you have any versioning strategies configured? These are found in Project > Deployments > Settings > Release versioning and/or Project > Deployments > Channels > (lifecycle) > version rules.

  • When you click ‘Create Release’ in the web portal and the release options are shown, do you see which version of the package is selected, or have an option to specify one? For example:

I’m looking forward to hearing back from you on the above.

Kind regards,
Patrick

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.