Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

continuous integration - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...