m.bharat
m.bharat

Reputation: 43

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.

Upvotes: 4

Views: 12073

Answers (1)

Prostagma
Prostagma

Reputation: 1851

--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}

Upvotes: 10

Related Questions