auto-updating custom feed

Topics: General
Jul 12, 2014 at 2:04 PM
We want to start using Nuget packages in our company. Policy dictates that packages must not be version controlled, and they must be available on premises, so that a network outage doesn't affect building, team build can quickly access packages, etc. We also want to install package updates of course. What's the leanest way to achieve this?

I know about hosting our own feed in a file share and deploying a Nuget.config to all PC's. I thought about disabling the official Nuget feed from the config file (does it even work?), and then there must be some guy who regularly puts new and approved packages into our custom repository. Problem is, he may forget to update stuff and it will slow down development if some packages are not added there. We could let everyone install stuff from the official feed, but then we have to make those packages magically appear in our local feed as well, to maintain policy. And that's all I could figure out so far.
Aug 11, 2014 at 6:01 PM
There are some commands out there to automatically mirror packages from one server to another - one example is in the CommandLine.ServerExtensions project within the NuGet code tree itself. That extension includes a 'mirror' command that can copy a package from one repository to another. I haven't used it myself, but it would probably be possible to script the command such that it runs across a set of packages at a given interval (CI server job maybe) and just pulls the latest or any versions of each package from the main NuGet feed into your private company feed.

Another option depends on what you may already use for a package repository for other languages. Some of the other repositories out there (I know Nexus does, I think Artifactory does too) support a proxy repository that mirrors a remote repository and they also support NuGet repositories. I'm not sure if they cache the packages or not, or if they just cache the package data itself. There may be a solution for you there too.