Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload an artifact to Jfrog Artifactory using Jfrog CLI?

I'm trying to upload an artifact from Bamboo CI using CLI for Jfrog Artifactory

I need to upload .p2 plugins and I have two options:

  • Upload the .zip and deploy it as Bundle Artifact
  • Upload the uncompressed folder with all subfolders and data.

I'm trying to upload the uncompressed folder with all the subfolders and data using this command:

jfrog rt upload --include-dirs=true ${bamboo.build.working.directory}/unzip/${bamboo.public.name-update-site}/* p2-release-local/${bamboo.public.name-update-site}/

But the problem is that the subfolders are empty.

Also I try to use this command:

jfrog rt upload --flat=false ${bamboo.build.working.directory}/unzip/${bamboo.public.name-update-site}/* p2-release-local/${bamboo.public.name-update-site}/

This command upload all the subfolders with all the data but the path isn't correct because is:

/name-update-site/datos/agents-home/xml-data/build-dir/PREDEL-RELPLU-JOB1/unzip/name-update-site

The content of the variable ${bamboo.build.working.directory} is

/datos/agents-home/xml-data/build-dir/PREDEL-RELPLU-JOB1/

EDITED: Log info:

INFO: Listing Bamboo directory
prueba-update-site.zip
unzip

INFO: Listing files from unzip folder
prueba-update-site

INFO: Listing files from custom folder 
artifacts.jar
content.jar
features  
plugins
site.xml
uninstall_fortify_plugins.cmd

Any help?

Thanks.

like image 830
Javier C. Avatar asked Sep 15 '25 11:09

Javier C.


1 Answers

Solved!

The solution is:

  1. Unzip the artifact .zip archive
  2. Upload with this command:

    jfrog rt upload --flat=false "${bamboo.public.name-update-site}/*" p2-release-local/
    

Thanks.

like image 178
Javier C. Avatar answered Sep 18 '25 09:09

Javier C.