0
votes

Mainly used for : C# project, nuget package dependencies, MSBuild build tool (no TFS)

We are evaluating Artifactory Pro eval version, Jenkins for CI & dependency management. Currently, I have setup Jenkins to use the "Generic-Artifactory integration" build environment to resolve/restore nuget packages from Artifactory. I am able to access artifactory from Jenkins and see the various repos.

All I am looking to see is to have the Jenkins CI use the Artifactory plugin to fetch Nuget packages from Artifactory. If the nuget packages are not cached currently in Artifactory, I will go fetch it from Nuget gallery (https://www.nuget.org) and cache them in one of remote repos in Artifactory. Then the subsequent builds can then fetch from this Artifactory cache repo for any nuget dependencies. How do i do this with Jenkins CI, MSbuild tool, Artifactory Pro eval version.

1

1 Answers

0
votes

IMO the fastest and easiest way to do that is to use the MsBuild Artifactory plugin. This plugin is a simple extension for Visual Studio which allows you to add a new project type to your solution. By doing it you will be able to control how to resolve nuget dependencies from Artifactory and what you want to publish in your repos.

Also I recommend using a single virtual repository for your case and to aggregate in it a local which will be your target for deployment and a remote connected to the official nuget gallery.

Also you can watch this webinar about the MsBuild Artifactory plugin. It is showing how to use it with TFS but the idea is the same for Jenkins as the plugin is simply an extension to the MsBuild process.