2

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?

TylerH
  • 20,799
  • 66
  • 75
  • 101
red888
  • 27,709
  • 55
  • 204
  • 392
  • As per prior advice, please run your work through an English spell-checker before submitting it here. It is getting tiresome to fix your wilful errors. – halfer Mar 28 '22 at 23:32

2 Answers2

4

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:

yahavi
  • 5,149
  • 4
  • 23
  • 39
  • 2
    Knowing where the data is stored on the local disk is important for CI/CD scenarios so I can make sure the volume is available on the server or container where the cli is running. – red888 Mar 29 '22 at 13:35
  • 2
    Note that you can also set the JFROG_CLI_TEMP_DIR environment variable, to determine the location of the temp build-info files, in addition to other temporary files generated by JFrog CLI. – Eyal Ben Moshe Mar 29 '22 at 16:34
0

I don't think there is a flush command to purge it.

You can run the below to view the build info of unpublished build info without publishing it.

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

Build-info is all the information collected by the build agent which includes details about the build. The build-info includes the list of project modules, artifacts, dependencies, environment variables and more.

Check the below documents.

Where is build info JSON stored in Artifactory 6.6 and above..

The New artifactory-build-info Repository and How to Configure Permissions to It.

The code for generating build-info is open and included in the build-info-go project on GitHUb. The build-info schema is available and included as part of projects README page.

vijay v
  • 1,888
  • 1
  • 12
  • 19