0
votes

I'm using jenkins to upload rpm artifacts to general repository. I would like to rename the rpm file from my_product_1.1.0.0.rpm to my_product.rpm.

I tried to add a

curl -umyUser:myP455w0rd! -T "http://artifactory:8081/../old name" "http://artifactory:8081/../new name"

command for uploading where the source is artifactory repo and the destination is the same repo but with a different file name. It fails "cannot find the source file"

Later, I tried to do it using "Publish Artifacts" field in jenkins:

/drop_folder/ => repo/my_product.rpm

but in this case, artifacts created a folder "my_product.rpm" and uploads the my_product_1.1.0.0.rpm within.

Can it be done in a different way?

1

1 Answers

0
votes

Using CLI for Jfrog Artifactory from Jenkins pipeline you can 2 options:

  1. Copying the file with the new name to another repo:

    jfrog rt cp "your-artifactory-repo/oldname.extension" your-artifactory-repo/newName.extension
    
  2. Download the artifact and upload to new repo with the new name (not recommended).