TeamCity Nuget feed on Linux

Answered

Good day,

Our team investigates possibility of creating CI/CD process on linux using TeamCity (application is on DotNet Core). We successfully created build process on linux with TC (as result we have .dll's and .npkg's). Also we started native TC nuget feed. But we stuck on publishing nuget packeges on TC nuget feed.

In article https://blog.jetbrains.com/teamcity/2011/12/setting-up-teamcity-as-a-native-nuget-server/ i found this:

"Since TeamCity itself is going to be a NuGet server, the step to publish a package is no longer required. However, packing the package is. In this step (NuGet Pack Build Type), we can just configure the output for the package to point to some specific folder, for instance packages"

unfortunately we can't create "NuGet Pack Build Type" step because Nuget is not ported to the linux.

So my question is: Are there any possibilities to get TC know that we prepared .nupkg file (with path on build agent box) and TC can take it and publish in its own NuGet feed?

something simmilar to ""##teamcity[setNugetPack '/opt/artifacts/nugetPackage.nupkg']"
Thanks in advance

 

4 comments

Hello Semen,

If you want to publish NuGet package to the internal NuGet feed you just need to publish NuGet packages as artifact to make TeamCity provide it in the feed.

We have the related request to support NuGet on Linux https://youtrack.jetbrains.com/issue/TW-24063, please vote for it.

 

0

Hi Alina - I appreciate that this is an old thread, but please can you expand on how to do the following:

"If you want to publish NuGet package to the internal NuGet feed you just need to publish NuGet packages as artifact to make TeamCity provide it in the feed."

I'm running TeamCity on Linux (inside Docker) and I'd really like to know how to publish my packages so that I can use them in Visual Studio.

0

Hi Steve,

we have reworked large parts of the NuGet feed in the last few releases, so it would be relevant to know which version you are using right now (and obviously we would like to recommend upgrading to a recent one if you aren't already using them).

Publishing to the nuget feed should be simple and is described in our documentation here: https://confluence.jetbrains.com/display/TCD10/NuGet#NuGet-TypicalUsageScenarios. This is identical for Linux and Windows, docker or not.

0

Thanks for getting back to me Denis - I did actually manage to get this working in the end.

I did the following:

  • Enabled "Generate NuGet package on build" in Visual Studio for all projects that I want to publish to my NuGet feed.
  • When my build in TeamCity runs I then add the following to the "Artifact paths" box in the top level configuration.
  • */bin/Release/*.nupkg
  • [You might want to make the wildcards less "wild".]
  • This makes all packages available on my feed, which is enabled as follows...
  • Enable the NuGet Feed option here:
  • {TeamCityUrl}/admin/admin.html?item=nugetServerSettingsTab
  • The URL to put into Visual Studio is listed in the screen.

Hope this helps others.

0

Please sign in to leave a comment.