How to set up a private Docker repository with Artifactory OSS? - docker

I tried to set up a private docker repository using Artifactory OSS (open source version) but could not find how to do it. The online documentation is about using the licensed Artifactory product as a docker repository.
Does anyone know how to set it up in Artifactory OSS?
I installed and started Artifactory OSS, but could not find docker package information. The Package View feature is disabled in OSS version.

According to the Artifactory Comparison Matrix, Artifactory OSS only supports Maven, Gradle and Ivy.
To use the Artifactory Docker package management you have to purchase Artifactory Pro, Artifactory Cloud or Artifactory Enterprise. Another solution is to use Nexus Repository OSS which include this feature in the open source version.

Related

JFrox Xray installation on Windows server

I Have JFrog Artifactory installed and up and running on Windows 2012 R2, now i want to install JFrog-Xray on the same server and linking with existing Artifactory instance, is it possible ?
As per JFrog documentation, XRay installer available only for for Docker runtime and Linux.
As described in the official JFrog Xray Installation docs, Xray cannot be installed on Windows directly.
There are two options here
Setup a Linux VM running in the same server and install Xray on it
Setup a separate, Linux based server and install Xray on it
You can also install both Artifactory and Xray together in the same Linux server or a Kubernetes (Linux) installation.
I know this answer does not provide a clean Xray on Windows solution, but does provide a viable option that is production grade.

Passing Jenkins credentials to Artifactory without the Artifactory plugin

I have been asked to work on an older shared version of Jenkins. It is so old that installing the Artifactory plug-in is just not possible. The latest version of the plug-in wont load and installing the older version and all its dependencies without an internet connection is just a pain.
In short is there a quick and simple way in which we can pass the credentials to artifactory from Jenkins before Jenkins tries to read or write to the Artifactory repo ?
Edit:
My setup is Jenkins running on RH Linux, building a very simple Maven project with the requirement to output the build artefacts to Artifactory. JFrog CLI is available with my version of Artifactory, however is not running currently on the Linux box.
Option 1 - JFrog CLI
See the documentation of the Maven commands.
JFrog CLI is available on multiple linux architectures (386, amd64, arm64, arm, s390x to date). You can install it as part of your pipeline. Get it here.
Option 2 - Maven Artifactory Plugin
See the documentation of the plugin. You can also learn how to use the plugin from this project example.
You could simply use the Artifactory REST API with curl. Depending on your repository:
curl -u myUser:myP455w0rd! -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
The documentation from JFrog about this is actually pretty good.
You can also add hashes and other parameters this way.
https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API

How to deploy .net artifacts to JFrog artifactory

As JFrog Artifactory provides maven repository which maintains a maven-metadata.xml to get the latest maven artifact.
Is there anything to maintain latest artifacts of .net web applications. It would be good if there's a solution with the trial version.
Thank you
Dotnet Binaries Image
On the PRO version of Artifactory you can also create a Nuget repository and deploy your .net files there. See additional information here:
https://www.jfrog.com/confluence/display/RTF/NuGet+Repositories

jfrog artifactory CLI deploy a jar in maven artifactory repo with inferred setting from jar

I am using Visual Studio Artifactory deployer to deploy jar files built by maven to Artifactory maven repo. If I use maven artifactory plugin the jar file gets deployed to right folder structure and maven setting stay as per the jar but from CLI if i push the jar file, it only get deployed as a jar file to the folder I specify. For example
Using CLI push a artifact.jar to target libs-snapshot/com/foo/bar
gets file uploaded to libs-snapshot/com/foo/bar and artifactory has
no information about jar version, group id , artifact id. I could not
find any options on the CLI to specify those.
While using Maven Artifactory plugin, a pushed jar ends up in
libs-snapshot/com/foo/bar/artifact/version folder and maven
properties stay intact
How do I achieve same behaviour from CLI as maven artifactory plugin does.
Just to make sure, how do you use the CLI for the deployment? In order to have it deployed to Artifactory using the CLI, you will have to specify the right Maven coordinates. For example:
jfrog rt u mySnapshot-1.0.0-SNAPSHOT.jar “libs-snapshot-local/path/to/folder/mySnapshot/1.0.0-SNAPSHOT/”
This will deploy your snapshot file to Artifactory and Artifactory, base on your repository configuration will replace the “SNAPSHOT” with a timestamp.
If you meant that you want to deploy 5 different files, to 5 different paths and that you wish that the JFrog CLI to extract the maven layout and deploy by it, then this is not possible by using the CLI.

Resolve nuget packages from Artifactory Pro using Jenkins Artifactory plugin for .net projects

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.
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.

Resources