Creating releases with different package source

Hi,

I have query which I thought someone else may have encountered and can help with. We follow GitFlow branching model and have separate Dev and Master builds. Nuget package output from these Dev and Master build is uploaded to separate Nuget repositories respectively. During deployment we deploy nuget package from Dev gallery to our Dev environment using CD pipeline. For rest of the environment we deploy packages from Master nuget gallery.

In Octopus how can I create a release for Dev deployment pointing to Dev Nuget repo and one deploying to Test or any other environment pointing to Master Nuget gallery. One way of doing this is to use variable in Octopus pointing to Dev gallery for Dev environment and Master gallery for other environments. There is one limitation with this approach though that I cannot scope my nuget gallery URL to Dev environment as this prevents release creation and retrieving package information. As a result I have keep my Dev Nuget gallery variably open scoped and scope my Master gallery variable Test, UAT and Prod environment. This can be a issue in case a new environment is added but variable is not scoped. There are chances package from Dev nuget gallery may get deployed to this environment.

Also, not all Master releases will be deployed. Our CI tool creates new release whenever there is a change in source code or in dependent nuget package. This creates lot of Master build but these are not continuously deployed to target environment. At given time latest Master release is picked and deployed to Test and environment and promoted further. I would like to preserve Nuget packages for the deployed referenced in Master release which was deployed. I cannot use Octopus built in package manager due to limitations placed by central Octopus team so I need to somehow preserve these packages in our Master nuget gallery as there is purge process which deletes packages after couple of months.

Any help in this regard will be highly appreciated!

Hi,

Thanks for getting in touch! I’m sorry for the delay in getting back to you, I just wanted to check that you have seen our Dynamically selecting packages documentation page?

It has instructions and information on selecting your package feed dynamically. From what I can see in your scenario, you will need to create a variable for the feed which is unscoped, this will let the release be created. You can then create your other variables with their respective value and scope. The unscoped variable lets the release through, then the appropriate variable is selected per environment. The documentation covers this in a lot more detail and provides you with some broader information.

If you have seen this documentation and are still having this issue, let me know. :slight_smile:

Best regards,
Daniel