Skip to content

Command Summary - New record functionality#1230

Merged
EyalDelarea merged 38 commits intojfrog:devfrom
EyalDelarea:command_summary_to_cli
Aug 21, 2024
Merged

Command Summary - New record functionality#1230
EyalDelarea merged 38 commits intojfrog:devfrom
EyalDelarea:command_summary_to_cli

Conversation

@EyalDelarea
Copy link
Copy Markdown
Contributor

@EyalDelarea EyalDelarea commented Aug 14, 2024

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

In addition to the existing simple data recording function, we now have the capability to record data with a predefined 'index'. This allows us to categorize and store specific information that can be easily accessed by other components within the summary report.

The main example of this usage is storing indexed scan results, which can later be attached to specific files in the summary.

Here’s an example of how to use the new function:

err = buildInfoSummary.RecordWithIndex("myBuildScanData", BuildScan, BuildName,BuildNumber)

Will resolve to a file system like this:
image

The supported indexes so far are:

  1. Build Scan
  2. Binaries Scan
  3. Docker Scan
  4. Sarif Report

Note

This change also requires that the generation of markdown will happen via a CLI command, rather than automatically. The PR in the CLI will introduce a new command called "create-summary-markdown".

@EyalDelarea EyalDelarea marked this pull request as ready for review August 14, 2024 13:32
@EyalDelarea EyalDelarea added the improvement Automatically generated release notes label Aug 14, 2024
@@ -15,23 +15,23 @@ const (
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire commandssummaries package is located directory under the artifactory/commands package. This is wriwrongng, because commandssummaries isn't a command.
I therefore suggest moving the entire commandssummaries directory to be under artifactory/utils.

@github-actions
Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


@EyalDelarea EyalDelarea merged commit a371242 into jfrog:dev Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants