Is there anyway that Nexus can be used as the artifact manager for the build output of a .NET application?
I very much understand Nexus can an excellent nuget proxy and internal artifact manager, however I need Nexus to operate a bit more downstream from those libaries and store the output of a TeamCity build.
I have looked into using the REST API to upload a zip file (of say an MVC website) but that doesn't look super sustainable. Any thoughts out there?
Is there anyway that Nexus can be used as the artifact manager for the build output of a .NET application?
Yes, but nexus version must be 2.9 or later.
Sonatype: With the release of version 2.9, NuGet support is available in Nexus Repository Manager Pro and Nexus Repository Manager OSS.
You can use NuGet hosted repositories to upload output of build artifacts.
I very much understand Nexus can an excellent nuget proxy and internal artifact manager, however I need Nexus to operate a bit more downstream from those libaries and store the output of a TeamCity build. I have looked into using the REST API to upload a zip file (of say an MVC website) but that doesn't look super sustainable. Any thoughts out there?
Instead of rest api, I am using NuGet CLI.
nuget push foo.nupkg API-KEY -Source https://www.nuget.org/api/v2/hosted-repo/
Accessing nuget hosted repo with API-KEY explained here.
First; generate an API-KEY.
Then; Activate the NuGey API-Key Realm
Finally, you can use following command to push your nuget package to hosted nexus repository on Nexus
nuget push foo.nupkg {GENERATED-API-KEY} -Source http://localhost:8081/repository/nuget-hosted/
Nexus supports hosted NuGet repositories that can be the deployment target of your nuget package you author internally. So you can sort of run an internal Nuget repo. Check out the documentation for NuGet with Nexus for more details on how to do the deployment.
http://books.sonatype.com/nexus-book/reference/nuget.html
There is also a good video intro available at http://www.sonatype.org/nexus/2015/06/04/license-and-vulnerability-tracking-for-nuget-packages-with-nexus-lifecycle/
Deploying a package would have to target a hosted repository and use authentication. Details can be found at http://books.sonatype.com/nexus-book/reference/nuget-deploying_packages_to_nuget_hosted_repositories.html
And if you do not want to use a nuget repository to store the build output, you could also e.g. upload a zip file to a Maven repository on the same server.
Once your build output is in a repository in Nexus (Maven or nuget) you can use e.g. plain HTTP GET calls with curl or anything else you want to download the install zip or so onto the deployment server and then install it there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With