Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curation command documentation. #2066

Merged
merged 7 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions documentation/CLI-for-JFrog-Curation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
JFrog CLI : CLI for JFrog Curation
asafambar marked this conversation as resolved.
Show resolved Hide resolved
======================================


Overview
--------
asafambar marked this conversation as resolved.
Show resolved Hide resolved

asafambar marked this conversation as resolved.
Show resolved Hide resolved
This page describes how to use JFrog CLI with JFrog Curation.
asafambar marked this conversation as resolved.
Show resolved Hide resolved
asafambar marked this conversation as resolved.
Show resolved Hide resolved

Read more about JFrog CLI [here](https://jfrog.com/help/r/jfrog-cli).
asafambar marked this conversation as resolved.
Show resolved Hide resolved

---
**Note**
> JFrog Curation is only available since [Artifactory 7.63.2](https://jfrog.com/help/r/jfrog-release-information/artifactory-7.63.2-cloud) And [Xray 3.78.9](https://jfrog.com/help/r/jfrog-release-information/xray-3.78.9).
asafambar marked this conversation as resolved.
Show resolved Hide resolved

---

### Syntax

When used with JFrog Distribution, JFrog CLI uses the following syntax:

$ jf ca command-name command-options

Where:


| | |
|-----------------|-------------------------------------------------------------------------------------------------|
| command-name | The command to execute. Note that you can use either the full command name or its abbreviation. |
| command-options | A set of options corresponding to the command |

asafambar marked this conversation as resolved.
Show resolved Hide resolved


### Commands
asafambar marked this conversation as resolved.
Show resolved Hide resolved

The following sections describe the commands available in the JFrog CLI for use with JFrog Curation.
asafambar marked this conversation as resolved.
Show resolved Hide resolved

Curation-Audit
---------------------
asafambar marked this conversation as resolved.
Show resolved Hide resolved
**Note**
>The command _curation-audit_ currently supports only [npm](https://www.npmjs.com/) projects.
asafambar marked this conversation as resolved.
Show resolved Hide resolved

The _jf curation-audit_ command enables developers to scan project dependencies to find packages that were blocked by the JFrog curation service. This command provides developers with more detailed information, such as whether the blocked package is the project’s direct dependency or is a transitive dependency. This information helps developers to resolve blocked packages more efficiently as they will be able to make a more informative decision based on what Policy violation occurred and what exactly needs to be resolved.

For each blocked package the CLI provides the violated Curation Policies, The command builds a deep dependencies graph for the project, and requests the Curation status by a HEAD request for each node in the tree. It uses the package manager that is used in the project to build the dependencies graph.
Before running the command, first, you need to connect the JFrog CLI to your JFrog Platform instance with the _jf c add_ command. Then ensure your project is configured in the JFrog CLI with the repository you would like to resolve dependencies from. To do this, set the repository with the _jf npmc_ command inside the project directory.
asafambar marked this conversation as resolved.
Show resolved Hide resolved




| | |
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| **Command name** | curation-audit |
| **Abbreviation** | ca |
| **Command options** | |
| --format | \[Default: table\]<br><br>Defines the output format of the command. Acceptable values are: table and json. |
| --working-dirs | \[Optional\]<br><br>A comma separated list of relative working directories, to determine the audit targets locations. |
| --threads | \[Default: 10\]<br><br>The number of parallel threads used to determine the curation status for each package in the project tree. | |

#### **Output Example**

![image](images/jf-ca-output.png)


**Example 1**

Curation-Audit the project at the current directory. Show all known packages blocked by curation policies.
asafambar marked this conversation as resolved.
Show resolved Hide resolved

jf curation-audit

**Example 2**

Curation-Audit the projects at the paths mentioned in the "working-dirs" option. Show all known packages blocked by curation policies for both projects in separate tables.
asafambar marked this conversation as resolved.
Show resolved Hide resolved

jf curation-audit --working-dirs="/path/to/project/npm_project1,/path/to/project/npm_project2"

**Example 1**

Curation-Audit the project at the current directory using 5 threads to check packages curation status in parallel. Show all known packages blocked by curation policies.
asafambar marked this conversation as resolved.
Show resolved Hide resolved

jf curation-audit --threads=5
Binary file added documentation/images/jf-ca-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading