MIgrating to new nuget feed

Hi

We have 2 existing external feeds, 1 nuget feed using url to a nuget server implemented with nuget.server and 1 using a shared folder location. Both storing packages on the same storage behind.

We would like to migrate all existing and future nuget packages to a new nuget feed using a nuget repository in artifactory 5.9.1 (or later) and replace the existing feeds in all processes with a new one.

Is this possible to do without making problems for existing releases?
What is the recommend steps for doing so and how do we verify that everything works as expected?

Best regards
Lars Jakobsen

Hi Lars, thanks for reaching out.

I just want to confirm my understanding of what you are trying to achieve. So you currently have:

  • A nuget feed backed by a folder
  • A nuget feed pointing to a server
  • Existing deployments that use both feeds

And you now want to have a single Artifactory feed that includes packages from both the existing nuget feeds without affecting existing deployments.

If that understanding is correct, then a solution would be to edit the two existing feeds to both point to the same new Artifactory feed. The details of the feed are read at deploy time, so the new settings will take effect with the next deployment. That way existing steps will request their packages from the existing feeds, but those feeds will now point to the Artifactory feed for their packages.

There is no special functionality that you can use to make sure all existing steps will work, so to ensure that this solution works I would recommend that you create a sample project first that uses the two existing feeds, update the feeds, and make sure the test project works as expected.

Does that sounds like it provides a solution for your situation?

Regards
Matt C

Hi

We thought of this as well and we assumed this would work.

I would however like to replace the 2 existing feeds with 1 new, or change the url of one feed and remove the other.

ie.

feed1 = https://myoldnugetserver
feed2 = \myoldsharedfolder\

becomes either

betternamedfeed = https://mynewshinyartifactoryrepo

or

feed1 = https://mynewshinyartifactoryrepo

as it is now we are enforced to keep ALL releases, so using your suggestion would leave some confusion as to which feed to use and neither of them would ever become obsolete

I hope that made it more clear.

Hi Lars,

Previous releases retain a reference to the feed that they used to complete a deployment. For example the error shown in the screenshot below is the result of attempting to redeploy an old release after one of the feeds it referenced was removed.

This error will be shown even if the project is updated to change a step to point to a new feed from a deleted feed, as the feed reference is captured as part of the release and will be reused.

If you intention is to be able to redeploy existing releases, then the feeds that they referenced during their deployment will need to exist. This means that you will not be able to delete “feed 2” and point all steps to “feed 1”.

You can rename the feeds though. Technically previous releases only capture the feed ID, and the feed ID is not changed when the feed name is changed.

Regards
Matt C

Ah

sorry the renaming possibility escaped me. I guess we will go with renaming the 2 existing feeds and pointing them to the new artifactory repo.

i.e
artifactory-packages = https://myshinynewartifactoryrepo (prev. feed1)
kept-for-retention-purposes-do-not-use = https://myshinynewartifactoryrepo (prev. feed2)

Thanks for your assistance.

BR
Lars Jakobsen

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