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

半世苍凉 提交于 2019-12-04 02:11:25

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/46152582/how-to-upload-an-artifact-to-jfrog-artifactory-using-jfrog-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!