Search code examples
artifactoryjfrog-cli

Where does the Jfrog cli store build info and how can I view it and clear it before publishing?


I'm looking at the documentation for how to publish build info with the cli. What is really unclear is how and where the cli stores the build info when running subsequent commands.

I can run a bunch of commands to "collect" build info: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-CollectingBuild-Info

And then I run a command to publish it to jfrog: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-PublishingBuild-Info

Where do commands like rt build-add-git and rt build-collect-env store build info that rt build-publish pushes to jfrog? On disk?

Where is the equivalent of a rt show-collected-build-info command so I can see what the heck this info is before I publish it?

Where is the command to "flush" the collected build info if I need to purge it and re-collect it?


Solution

  • As @vijay said, to see the build info before publishing, you can use the --dry-run flag:

    jf rt bp [build-name] [build-number] --dry-run
    

    To clean local build info files, run the build-clean command:

    jf rt bc [build-name] [build-number]
    

    Notice - if you're using a project, please add --project to the commands above.

    The JFrog CLI stores the build info files in a temp directory of the operating system. After having the two commands above, one doesn't really need to reach the files directly.

    However, if you still need to see the files, you can set the JFROG_CLI_LOG_LEVEL=DEBUG environment variable and look for the following output, after running a command that adds to the build info (like build-add-git, build-collect-env, etc):

    08:26:43 [Debug] Saving build general details at: /var/folders/dn/3smrq2yj2qddjccqlky47mpw0000gq/T/jfrog/builds/85b1af1d96d3418a8940f4a586f4efc0ac143c714b149f3423611057af028ce5/partials

    For more information: