3

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.

Javier C.
  • 7,859
  • 5
  • 41
  • 53
George
  • 170
  • 2
  • 13

2 Answers2

3

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/

Ariel
  • 3,406
  • 14
  • 17
  • If I understand you correctly you mean download an artifact to my machine then publish it to the other instance. I was wondering if there was a way to directly copy directly between instances. – George May 10 '17 at 22:51
  • 1
    Other then replication there is no out of the box option to do what you want. The only option would be to write a user plugin which requires a PRO version of Artifactory and some time to write it. – Ariel May 11 '17 at 07:19
2

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.

Javier C.
  • 7,859
  • 5
  • 41
  • 53
  • this does not seem to work between artifactory instances. With basic auth I get some strange errors – Michel Apr 20 '18 at 12:23