How to configure Octopus to acquire package as the release version

We have two branches master and dev and one deployment project for both of them. The dev branch plan in the build server was created much later than the master and their package numbers are little behind. During the deployment, in the acquiring packages step the packages from the master(2.1.1.100) are fetched from the cache instead of the dev packages(2.1.1.30) every time.

Options tried:

  1. Added the variable Octopus.Deployment.ForcePackageDownload and set to true.
  2. Always download the package from nuget server option while deploying and they don’t seem to work.

How to force the octopus to deploy the same version as the release version instead of checking in the cache ? If you have any other better alternatives also, please share. Thanks in advance.

Hi @pari.shanmugam ,

Thanks for reaching out.

To get to the bottom of this, can you please send me a screenshot of how your channels are setup including the package versioning?

Looking forward to hearing back.

Best,
Jeremy

We just have the default channel without any version rules

Hi @pari.shanmugam,

I think we have a couple ways of handling this but to approach this in the best way, can you please tell me how you’re creating your releases? Is it part of your build pipeline or are you manually creating them in the portal?

What is the overall goal you’re looking to achieve? We may be able to approach this from a different angle depending on

Please let me know.

Best,
Jeremy

The versions of the packages are created from the build server. For this particular project, we only were using the master branch to trigger the builds and it has over 200 builds and the current build version is 2.1.1.201.

Now, we are configuring dev branch and if we follow the same versioning the builds, it would again start from 2.1.1.1, and cause error while creating packages because it would already exist. we have changed the build prefix to 2.1.0 but during the acquiring packages it always fetches the master branch packages from cache, sine they are the higher version.

Our requirement is we want to use the same deployment project and be able to deploy packages from both dev and master.

Hi Pari,

When creating a new Release, whichever packages are selected at release creation will be used during the deployment. And unless you specify a particular package version, Octopus will pick the latest version to link to the Release.

In a situation like this where you have packages from different branches sharing similar versioning, the best option would be to add a new channel to your project for the Dev branch to use.

Along with this, you would also want to amend your build pipeline so that the packages from the Dev branch are given a pre-release tag, e.g. 2.1.0-dev.

You can configure a version rule within each channel to prevent the different packages from being created in the wrong channel.
So, for the original channel, you would add a Pre-release tag rule of ^$, which specifies that only packages with no pre-release tag can be used.
e.g.

Then for the Dev channel, you would add a Pre-release tag rule of dev which specifies that only packages with a pre-release tag of “dev” can be used for that channel.
e.g.

Regards,
Paul

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