Octopus.Deployment.ForcePackageDownload does not force re-download of nuget package from repo

Our developers frequently build “snapshot” builds that they wish to deploy to our dev environment and the version number doesn’t change.
I have added a variable to my project “Octopus.Deployment.ForcePackageDownload” and set it to “True”.
When re-deploying though, the “Acquire packages” step always says "Checking package cache for package MyPackage 1.0.8-d
Package was found in cache. No need to download. Using file: ‘e:\xyz\MyPackage.1.0.8-d_413F27C157C2334786060B4DBDF84A87.nupkg’

If in the GUI, I select force re-download, it goes out to our repo and pulls down the latest file for that version and does not use the cache

In testing, I added another variable: OctopusPrintEvaluatedVariables = True
I can now see in each step of my project the entry [Octopus.Deployment.ForcePackageDownload] = 'True’
But for my “Deploy Package” step (deploy nuget package) it doesn’t print any of these variables.
There is a non-numbered step called “Acquire packages” which gives the message above about finding the package in cache and not downloading. It doesn’t show any of the variables in it either.

it doesn’t seem that the Deploy Nuget Package step (and Acquire Packages) use or check the variables to decide if it should download or not.
Thanks!
Peter

Hi Peter,

Thanks for getting in touch! We have a number of variables that you can set in the interface, that we need prior to the deployment starting, that are then not overwrite-able by the user.
In this specific case it is one of them. To use the setting you will have to set it per project in the UI.

You may still find that you have some troubles with caching, as Octopus is built around the best practice principles of a deployment artifact version being a source of truth and never having updated files.

Sorry if it wasn’t the news you were expecting,
Vanessa

I see, thank you for explaining. Thanks Vanessa!

If there is a chance of getting this added in a future release where we could override the gui setting using the variable that would be awesome :slight_smile:

Cheers
Peter