Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload complete folder structure to Artifactory repo to a new folder and keep he folder name as it is?

I'm new to automation and Tried uploading entire folder structure to Artifactory repo with parent folder and child folders

structure is as below

test1 folder contains sub-folder: new_ref and it also contains sub-folder>>v1, new_data1 and it also contains sub-folder>>v1, v1 and it also contains sub-folder>>bl, memo

Tried using both --flat=true and false option:

jfrog.exe rt u --flat=false "F:/main/test1/" mr-local-generic/new_data/

On Artifactory its required to create folder name "new_data" and under that it should upload below folders with their respective child folders intact: new_ref, new_data1, v1, memo

But it creates folder name as new_data/F:/main/test1/ , how to resolve this any help is much appreciated.

like image 422
m.bharat Avatar asked Oct 18 '25 15:10

m.bharat


1 Answers

--flat=false keeps the system hierarchy. If you wish to upload without the path prefix, you have the following options:

  1. Run the upload command from the directory you wish to upload from, and use relative path with --flat=false:
cd /d F:\main\test1
jfrog.exe rt u --flat=false "./" mr-local-generic/new_data/
  1. Use Placeholders:

jfrog.exe rt u "F:/main/test1/(*)" mr-local-generic/new_data/{1}


To apply the source path pattern for directories as well as files, add the include-dirs flag.

For example:

jfrog.exe rt u --include-dirs=true "F:/main/test1/(*)" mr-local-generic/new_data/{1}

like image 56
Prostagma Avatar answered Oct 22 '25 06:10

Prostagma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!