0

I have following folder structure on local machine

c:\git
      \repo
         \myproject
             \build
                \assets
                    \html
                    \js
                    \css

I am using the following command to upload artifacts to Artifactory

jf rt u "c:\git\repo\myproject\build\*" my-jfrog-repo-generic-local/2023/ --sync-deletes="my-jfrog-repo-generic-local/2023/"

This collect all files located under the build directory (including sub-directories), and upload them to the my-jfrog-repo-generic-local repository, under the 2023folder, while maintaining the complete original path of artifacts. So after the upload in Artifactory repository the hierarchy is

  `my-jfrog-repo-generic-local`
     2023
       C:
         git
           repo
             myproject
                build
                   \html
                   \js
                   \css

instead, I want to keep folder structure of only source folder. (Exclude source's parent folder). So in this case the target folder structure should be

  `my-jfrog-repo-generic-local`
     2023
        build
          \html
          \js
          \css
  

How can we do this using the JFrog CLI?

TylerH
  • 20,799
  • 66
  • 75
  • 101
LP13
  • 30,567
  • 53
  • 217
  • 400

1 Answers1

0

To solve this, move to the path where the folder to push is located and add the parameter --flat=false. It should still be a default parameter.

Some useful link:

https://www.jfrog.com/confluence/display/RTF4X/Using+File+Specs

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

https://jfrog.com/knowledge-base/artifactory-how-to-upload-a-folder-with-its-content-to-artifactory/

glv
  • 994
  • 1
  • 1
  • 15