Rebuild TeamCity nuget feed

Completed

We have a nuget package strategy where we publish all packages we need to build our products in the TeamCity nuget feed. External packages are published to the feed with a project that checks them out from VCS and the publish all the packages as artifacts. Internally built packages are published as they're built, of course.

Now, as a test we want to rebuild the nuget feed from scratch (we've moved the external packages and we would like to make sure we did so properly). We have two questions (in order of importance):

1: We would like to republish all build artifacts to the feed. Is there some easy way to do this? As far as we remember build artifacts don't just automatically appear in the TC nuget feed - but I also have vague recollections that you could clear a cache or something and thus force the feed to rebuild itself.

2: How do you test this in practise? I assume removing and then readding the nuget feed will result in a fresh feed with no packages.

0
1 comment
Avatar
Fedor Rumyantsev

In order to enforce feed refresh, you could refer to this article: https://www.jetbrains.com/help/teamcity/common-problems.html#Problems-with-TeamCity-NuGet-Feed
I must note that for a setup which is heavy with builds and build data, metadata rebuild could take a while - feed will list no packages until they are re-added, so doing this overnight could be a safer approach. 

Speaking of the testing - feed link is an internal property of a build instance; therefore, if a feed is removed, there is no ready solution to reattach existing build artifacts to a newly-created feed. As an alternative solution, you can create another feed and a temporary configuration which would publish the whole set of packages into this new feed, then try to run a custom build externally with a NuGet source pointed to a newly-created feed. 

0

Please sign in to leave a comment.