ivoruJavaBoy
ivoruJavaBoy

Reputation: 1357

Artifactory: Move artifact from repo to another repo, filtering the artifacts

I've a artifactory server that contains this repositories

I've to move some artifact (around 50.000) from releases to locked releases...

I will need to identify artifacts with a precise version:

For example all the artifacts with a version that begin with RC or all the artifacts that end with M1

Now here are my questions:

Thank you!!

Upvotes: 1

Views: 1945

Answers (1)

JBaruch
JBaruch

Reputation: 22893

There are two ways to do it:

  1. Write a script that fetches the artifact list from releases, filter them by your logic and then move the filtered artifacts.
  2. Write an execution user plugin that does pretty much the same: get the children of root in releases, filter them and then move the filtered items.

While the earlier is easier to develop (you can use any language to write the script and don't need to deploy it), the later will be much faster (since executed in Artifactory and does not require separate REST call to move each of 50K artifacts). Considering the amount of artifacts to move, I would definitely recommend writing a user plugin.

Upvotes: 2

Related Questions