I am new to Artifactory, and I wonder how to upload a directory structure containing many different binaries -- keeping the structure intact -- to an artifactory?
Asked
Active
Viewed 1.4k times
3 Answers
6
This can be done through the Jrog CLI. The CLI has a recursive option that looks like it will do what you hope.
jfrog rt upload --recursive artifactory-mirror/* artifact-repo/dir-struct/
The CLI also has some performance improvements for uploads that doing it through curl or a browser don't seem to get. Also, scriptable!
To include full directory structure you will want to use the flag --flat=false
jfrog rt upload --flat=false --recursive artifactory-mirror/* artifact-repo
sysadmin1138
- 206
- 1
- 7
1
Adding on @sysadmin1138's answer, to push the content of a folder to another folder while keeping the directory structure starting from the source folder, you can use:
(cd source-folder && jfrog rt upload --detailed-summary --flat=false --recursive ./ artifact-repo/target-folder/
The --detailed-summary will tell you the details of all the files uploaded.
felipecrs
- 121
- 3
1
Since the original question is also tagged with Nexus this is how to do bulk upload with Nexus 3:
find <directory name>/ \! -type d -print0 | xargs -P10 -0 -I@ curl -v --user <user>:<password> --upload-file ./@ http://localhost:8081/repository/<repository name>/@
Markus
- 111
- 2