ARTIFACTORY: How to upload a folder (with its content) to Artifactory
There are two ways to upload a folder and its content to Artifactory.
Via UI:
1. Select the repository and folder that you want to deploy to
2. Click on the Deploy button
3. Switch to the ‘Multiple Deploy’ option
4. Click on ‘Select file’
5. Select all the files from the folder you would like to deploy and hit ‘Open’
6. Type the desired folder name
7. Hit ‘Deploy’
The files are now deployed to the new folder:
Via JFrog CLI:
Install the latest JFrog CLI version:
https://www.jfrog.com/getcli/
Then, configure it to point to your JFrog Platform:
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI#JFrogCLI-JFrogPlatformConfiguration
Now, we will use the upload command:
https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UploadingFiles
1. Navigate to where the folder is located in your file system:
$ ll total 0 drwxr-xr-x 5 admin staff 160 May 27 10:34 my-folder These are the files in the folder: $ ll my-folder total 24 -rw-r--r--@ 1 admin staff 12 May 27 10:34 aaa -rw-r--r--@ 1 admin staff 12 May 27 10:34 bbb -rw-r--r--@ 1 admin staff 12 May 27 10:34 ccc
2. Now, run the ‘rt upload’ command to recursively deploy the folder and its content to Artifactory.
$ jfrog rt upload "my-folder/*" generic-local --server-id=local
{
"status": "success",
"totals": {
"success": 3,
"failure": 0
}
}
3. See the uploaded folder in Artifactory UI: