Nuget intermediary for faster updates

Viewed 29

Let's say my company creates:

  1. a commercial product "Product"
  2. a free opensource library "Library"

"Library" is published on Nuget for other people.

"Library" is also used by "Product" also via a nuget reference.

Sometimes we find an urgent bug in "Library", that we need to fix and release updates to both "Library" and "Product".

We fix the bug, publish the fix to Nuget.... aaaahnd then we have to wait a couple of hours until nuget publishes the fixed version.

How do teams usually solve this problem elegantly?

2 Answers

Basically there are several ways to solve such problems. But the way, we used in our project is to not use NuGet for such dependencies. We place such "Libraries" in the separate project, that is a part of a "Product" repository, or "Product" repository refer to this "Library" with git-modules. The build process of product in this case would be:

  1. Build "Library" -> after this publishing process to nuget started automatically in the separate job (speaking about automation build on Jenkins)
  2. Build "Product" using built "Library"
  3. Publish "Product"

In this piplene additional built options like "Building and publishing only library" will be helpfull in your build scripts.

If you refer to "Library" as to git submodule, so all staff, connected with library build and publishing can be placed there. So I recomment use git submodule for this. Also with git submodule it will be easier to mange version of "Library" that you want to use in your "Product"

You can create own "Nuget package source" somewere in the cloud, or in your company network. And, on building your "Library", publish it in both sources: nuget.org and your own one. So, in your internal projects you will use your package source an be able to receive updates right after publishing, but other users of this "Library" will able to include it in their project with regular nuget.org.

Related