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?