-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from Althaf66/Althaf66/clidocs
Add: Documentation for CLI
- Loading branch information
Showing
41 changed files
with
1,603 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Harbor CLI Documentation | ||
|
||
Welcome to the Harbor CLI documentation guide! This document outlines the steps to generate the CLI documentation files. | ||
|
||
## Overview | ||
|
||
The [doc.go](./doc.go) script is designed to create markdown files that detail the functions of commands available in the Harbor CLI. These files are generated based on the existing cli commands and it will be placed in the [cli-docs](./cli-docs) directory. | ||
|
||
## Steps to Generate CLI Documentation | ||
|
||
1. Clone the repository | ||
```bash | ||
git clone https://github.com/goharbor/harbor-cli.git | ||
``` | ||
|
||
1. Navigate to the doc directory: | ||
```bash | ||
cd harbor-cli/doc | ||
``` | ||
change your directory to the `doc` folder where the `doc.go` script is located. | ||
|
||
2. Run the `doc.go` file: | ||
```bash | ||
go run doc.go | ||
``` | ||
This generates markdown files for CLI commands that do not already exist in the [cli-docs](./cli-docs) directory. | ||
|
||
## Generate Documentation using Dagger | ||
|
||
Make sure you have latest [Dagger](https://docs.dagger.io/) installed in your system. | ||
|
||
```bash | ||
git clone https://github.com/goharbor/harbor-cli.git | ||
cd harbor-cli | ||
dagger call run-doc --source=. export --path=doc | ||
``` | ||
This would runs the dagger function and generate markdown files in [cli-docs](./cli-docs). | ||
|
||
### Note | ||
|
||
- For any newly generated markdown files, ensure to set the weight according to the order you want them to appear. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Harbor CLI Commands | ||
weight: 25 | ||
--- | ||
|
||
This section describes the comprehensive set of commands provided by the Harbor CLI, which enables you to efficiently manage and interact with your Harbor registry. The Harbor CLI commands are categorized by function, | ||
|
||
- `harbor` - Configure the Harbor CLI and set global flags to customize your experience. | ||
- `harbor artifact` - Manage artifacts in Harbor Repository | ||
- `harbor project` - Manage projects and assign resources to them | ||
- `harbor registry` - Manage registries in Harbor | ||
- `harbor repo` - Manage repositories in Harbor context | ||
- `harbor user` - Administer users in Harbor, including creating, updating, and managing user accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: harbor artifact delete | ||
weight: 35 | ||
--- | ||
## harbor artifact delete | ||
|
||
### Description | ||
|
||
##### delete an artifact | ||
|
||
```sh | ||
harbor artifact delete [flags] | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for delete | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact](harbor-artifact.md) - Manage artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: harbor artifact info | ||
weight: 25 | ||
--- | ||
## harbor artifact info | ||
|
||
### Description | ||
|
||
##### Get info of an artifact | ||
|
||
### Synopsis | ||
|
||
Get info of an artifact | ||
|
||
```sh | ||
harbor artifact info [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact info <project>/<repository>/<reference> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for info | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact](harbor-artifact.md) - Manage artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: harbor artifact list | ||
weight: 30 | ||
--- | ||
## harbor artifact list | ||
|
||
### Description | ||
|
||
##### list artifacts within a repository | ||
|
||
```sh | ||
harbor artifact list [flags] | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for list | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact](harbor-artifact.md) - Manage artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: harbor artifact scan start | ||
weight: 45 | ||
--- | ||
## harbor artifact scan start | ||
|
||
### Description | ||
|
||
##### Start a scan of an artifact | ||
|
||
### Synopsis | ||
|
||
Start a scan of an artifact in Harbor Repository | ||
|
||
```sh | ||
harbor artifact scan start [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact scan start <project>/<repository>/<reference> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for start | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: harbor artifact scan stop | ||
weight: 50 | ||
--- | ||
## harbor artifact scan stop | ||
|
||
### Description | ||
|
||
##### Stop a scan of an artifact | ||
|
||
### Synopsis | ||
|
||
Stop a scan of an artifact in Harbor Repository | ||
|
||
```sh | ||
harbor artifact scan stop [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact scan stop <project>/<repository>/<reference> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for stop | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact scan](harbor-artifact-scan.md) - Scan an artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: harbor artifact scan | ||
weight: 40 | ||
--- | ||
## harbor artifact scan | ||
|
||
### Description | ||
|
||
##### Scan an artifact | ||
|
||
### Synopsis | ||
|
||
Scan an artifact in Harbor Repository | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact scan start <project>/<repository>/<reference> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for scan | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact](harbor-artifact.md) - Manage artifacts | ||
* [harbor artifact scan start](harbor-artifact-scan-start.md) - Start a scan of an artifact | ||
* [harbor artifact scan stop](harbor-artifact-scan-stop.md) - Stop a scan of an artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: harbor artifact tags create | ||
weight: 60 | ||
--- | ||
## harbor artifact tags create | ||
|
||
### Description | ||
|
||
##### Create a tag of an artifact | ||
|
||
```sh | ||
harbor artifact tags create [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact tags create <project>/<repository>/<reference> <tag> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for create | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: harbor artifact tags delete | ||
weight: 70 | ||
--- | ||
## harbor artifact tags delete | ||
|
||
### Description | ||
|
||
##### Delete a tag of an artifact | ||
|
||
```sh | ||
harbor artifact tags delete [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
harbor artifact tags delete <project>/<repository>/<reference> <tag> | ||
``` | ||
|
||
### Options | ||
|
||
```sh | ||
-h, --help help for delete | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
```sh | ||
--config string config file (default is $HOME/.harbor/config.yaml) (default "/home/user/.harbor/config.yaml") | ||
-o, --output-format string Output format. One of: json|yaml | ||
-v, --verbose verbose output | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [harbor artifact tags](harbor-artifact-tags.md) - Manage tags of an artifact | ||
|
Oops, something went wrong.