How to copy specific artifacts across multiple instances in Artifactory? - artifactory

How can I copy a specific artifact to another instance of Artifactory?
From what I can see the export/import functionality only works for full system or full single repo copying. I don't want to replicate the full repo either. I just want to copy specific artifacts.

Have you tried using the JFrog CLI? It can be used to download artifacts from Artifactory by giving a specific pattern. So, for example, you can download only the "war" files from a specific repository and then import it / deploy it to the rest of the instances that you want. You can also write a script using the JFrog CLI that will download and then publish those artifacts to the other Artifactory instances using the CLI.
https://www.jfrog.com/getcli/

You can use CLI for Jfrog Artifactory for copying the file with the new name to another repo:
jfrog rt cp "your-artifactory-repo/artifact.extension" your-new-artifactory-repo/artifact.extension
Note: you can use * if you want to copy all the artifacts from the folder.

Related

How to add veracode scanning to JFrog artifactory

Hi I am trying to find a simple solution to run a static security scan on binaries stored in JFrog Artifactory. It looks like the veracode integration supports Artifactory 6.7.8 https://community.veracode.com/s/article/Support-Matrix. Has anyone used this plugin with newer versions of Artifactory? If so how did you add the plugin to Artifactory? I'm trying to find a simple way to add the integration.
I was able to do this by using rtUpload and rtDownload jenkins plugins. https://www.jfrog.com/confluence/display/JFROG/Declarative+Pipeline+Syntax.
Make a repo for the binaries
Write a function for uploading the binaries to artifactory
Write a function for downloading the binaries from artifactroy

Get Latest Artifact from JFrog - Artifactory OSS

I'm using JFrog Artifactory OSS in a docker container.
I want to download the latest version of an artifact. But it seems that it is not possible in OSS version.
Does anybody know a way to download the latest version of the artifact?
You are right, the Latest Version API endpoint works only in Artifactory Pro.
Working with Maven repositories, you can use the SNAPSHOT support to get Artifactory to return you the latest artifact.
Setting the Maven Snapshot behavior in repo settings to Unique, deploy the artifacts with -SNAPSHOT suffix. Artifactory will assign a unique version to those files internally, but you will always be able to retrieve the latest one using the -SNAPSHOT suffix.
Thanks a lot for your fast answer. I forgot you tell my hole workflow.
I have a jenkins server, building, testing and deploying my stuff.
I want build a spring boot jar file with maven and deploy it to my repository(i use jfrog). This works perfect. In a next step i will create a docker image containing this jar file. So the in the image file ther must be a command to download the execuatbel jar from jfrog. So for this reason i have to know the latest version of the jar file.
I hope you could understand it, this is my first english question.
Thanks a lot for helping me !

Jfrog CLI for Artifactory: download folder archive

I am using JFrog CLI (jfrog rt download) to download build reports from Artifactory that are published there by GitLab CI in unpacked state in order to allow unhindered html reports browsing.
However it takes extremely long (10-20 minutes) because of just how many small files there are.
I see that Artifactory has REST API to download whole repository folder content in one swoop as a single archive.
But I am not able to find any way to do the same using JFrog CLI.
Am I missing something or is there truly no way to download whole folder content as an archive using JFrog CLI?
P.S.: I am aware that there is a configuration option on Artifactory that supposedly allows to browse contents of archives, but there are reasons (organizational and technical) preventing me from using it
Using the CLI you can increase the "--threads" value. I have seen a massive improvement when downloading a directory with lots of small files when increasing the number of threads.

Pull Artifacts from Nexus into XL Deploy

We have XLDeploy being used to deploy application. We do not want to use default feature where Nexus pushes new XL deploy whenever it get new artifacts. On the need basis we want to pull the artifacts from Nexus into XL Deploy. What are the steps?
You will need first to Configure XL Deploy to fetch artifacts from a repository, Then you can add an externally stored artifact to a package .. You may also have a look on this tutorial deploy an externally stored artifact using the cli which will show you how to use the XL Deploy (CLI) to deploy an artifact from a Maven repository such as Artifactory or Nexus.
You can also try using the XLRelease and give the configuration details with Nexus repository. That will help you out!

Link Conan packages over local repositories

Is there some way to link Conan packages over local repositories like Bintray (conan-center) ?
I read Manipulating Artifacts but I just found Copy and Move features.
Regards.
Artifactory does not support linking artifacts between repositories.
As you mentioned, you can copy artifacts between repositories. Keep in mind that this is a "cheap copy" - since Artifactory is using a checksum based storage, the bytes are not duplicated and instead Artifactory just creates another pointer in the database.
Another option for having the same artifact in multiple repositories is using virtual repositories (will be supported in the future for Conan). You can keep the artifact in a local repository and include this local repository in multiple virtual repositories. This will result with being able to access the same artifact from multiple virtual repositories.

Resources