-1

I have a local repo I created: test_generic

I'm trying to upload a local folder and I'm seeing this output:

jfrog rt upload 'local-folder' 'test_generic/local-folder' --archive=zip --flat

20:02:18 [Debug] JFrog CLI version: 2.45.0
20:02:18 [Debug] OS/Arch: linux/amd64
20:02:18 [Debug] Usage Report: Sending info...
20:02:18 [Debug] Saving build general details at: /tmp/jfrog/builds/b14a20bb9a7bb0b05fa940376fbc111e653308ec8b6234122b1b43719aa4d243/partials
20:02:18 [Debug] Sending HTTP GET request to: https://me.jfrog.io/artifactory/api/system/version
20:02:18 [Debug] Uploaded 0 artifacts.
20:02:18 [Debug] Creating temp build file at: /tmp/jfrog/builds/b14a20bb9a7bb0b05fa940376fbc111e653308ec8b6234122b1b43719aa4d243/partials
20:02:19 [Debug] Artifactory response: 200 
20:02:19 [Debug] JFrog Artifactory version is: 7.65.3
20:02:19 [Debug] Sending HTTP POST request to: https://me.jfrog.io/artifactory/api/system/usage
20:02:20 [Debug] Usage Report: Usage info sent successfully. Artifactory response: 200 
{
  "status": "success",
  "totals": {
    "success": 0,
    "failure": 0
  }
}

But I'm seeing Uploaded 0 artifacts.

This is infuriating. Even with debug turned on I'm provided with useless output.

How do I see what it's trying to do and why it did not upload artifacts?

Is it a problem with the folder? Is it a problem with the artifact path? Literally any feedback from the cli would be better than what I'm getting.

Edit

Just want to make it clear I'm interested in understanding the verbosity/logging options I have available in the cli- not troubleshooting this specific problem.

Thus far I have found only export JFROG_CLI_LOG_LEVEL=debug which returns the output shown above which is not helpful or very verbose.

Just to add the jf rt build-discard command has this problem too. It tells me Builds discarded., but no builds have been discarded. Again the command completes with no error and even with debug on I have no idea what it even tried to do.

TylerH
  • 20,799
  • 66
  • 75
  • 101
red888
  • 27,709
  • 55
  • 204
  • 392
  • You must specify your files of directory with "*" as ``jfrog rt upload 'local-folder/*' 'test_generic/local-folder' --archive=zip --flat``. – Amirhossein Taheri Aug 20 '23 at 14:11

1 Answers1

0

Based on the provided CLI output, it appears that the artifact path might require some adjustment. When uploading a folder, it is important to correctly specify the path to the contents within it. For instance, using the format "folder-name/*" indicates that you intend to upload all the contents enclosed within the folder. Alternatively, you can directly navigate into the folder and utilize "*" as the parameter while performing the upload.

Here are a couple of examples to clarify the process:

  1. If you wish to upload the contents of a folder while keeping the folder's name consistent with the local machine:

a. To achieve this, first navigate to the intended folder level and then execute the following command:

> jf rt upload "*" 'repository-name/local-folder/' --flat

This command will upload all files contained within the folder and store them under the "local-folder" within Artifactory.

b. In cases where you are one level above the folder, employing the subsequent command could prove helpful:

> jf rt upload "local-folder/*" 'repository-name/local-folder/' --flat
  1. For uploading a folder as a zip archive to Artifactory, the following command is suitable:

    jf rt upload 'local-folder/*' 'repository-name/local-folder.zip' --archive=zip --flat

This command will result in the upload of a zip file named "local-folder.zip" within Artifactory, encompassing all files originating from the "local-folder".

For more information on JFrog CLI command you can refer to the CLI documentation.

  • While this was one of several syntax issues I was fighting with it doesn't answer my actual question. I suspect the answer is "the cli currently has no way of outputting _why_ it uploaded 0 artifacts", but I would like some confirmation that there is absolutely no trace or higher verbosity level that returns helpful information. – red888 Aug 21 '23 at 13:15