-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ALTHAF <[email protected]>
- Loading branch information
Showing
48 changed files
with
1,656 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# Step 1: Clone the required repositories | ||
HARBOR_CLI_REPO="https://github.com/goharbor/harbor-cli.git" | ||
|
||
# Clone both repos if not already cloned | ||
if [ ! -d "harbor-cli" ]; then | ||
git clone $HARBOR_CLI_REPO | ||
fi | ||
|
||
# Define the paths for relevant folders | ||
HARBOR_CLI_DOCS="harbor-cli/doc/cli-docs" | ||
WEBSITE_CLI_DOCS="content/cli-docs/cli-docs" | ||
|
||
# Step 2: Check for missing files | ||
# List files in both directories | ||
|
||
CLI_FILES_HARBOR_CLI=$(ls $HARBOR_CLI_DOCS) | ||
CLI_FILES_WEBSITE=$(ls $WEBSITE_CLI_DOCS) | ||
|
||
# Find files in harbor-cli that are not present in website's cli-docs folder | ||
|
||
MISSING_FILES=() | ||
for FILE in $CLI_FILES_HARBOR_CLI; do | ||
FILENAME=$(basename "$FILE") | ||
if [ ! -f "$WEBSITE_CLI_DOCS/$FILENAME" ]; then | ||
MISSING_FILES+=("$FILENAME") | ||
fi | ||
done | ||
|
||
# Step 3: Copy missing files | ||
if [ ${#MISSING_FILES[@]} -eq 0 ]; then | ||
echo "No missing files." | ||
else | ||
echo "Copying missing files..." | ||
for FILE in "${MISSING_FILES[@]}"; do | ||
cp "$HARBOR_CLI_DOCS/$FILE" "./content/cli-docs/cli-docs" | ||
echo "Copied $FILE successfully" | ||
done | ||
|
||
fi | ||
|
||
rm -rf harbor-cli |
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 @@ | ||
Harbor CLI Documentation | ||
|
||
This is the main table of contents for the Harbor CLI documentation. | ||
|
||
## Harbor CLI Documentation | ||
|
||
This section provides detailed documentation for the Harbor CLI, which allows users to interact with the Harbor using command-line commands. | ||
|
||
- [harbor artifact](cli-docs/harbor-artifact.md) | ||
- [harbor project](cli-docs/harbor-project.md) | ||
- [harbor registry](cli-docs/harbor-registry.md) | ||
- [harbor repo](cli-docs/harbor-repo.md) | ||
- [harbor user](cli-docs/harbor-user.md) |
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,20 @@ | ||
--- | ||
title: Harbor CLI Documentation | ||
--- | ||
|
||
Welcome to the Harbor CLI documentation. This provides detailed documentation for the Harbor CLI. | ||
|
||
## Harbor CLI Documentation | ||
|
||
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. | ||
|
||
- `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 | ||
|
||
## Access the Documentation Source Files | ||
|
||
The source files for this documentation set are located in the [Harbor CLI repository on Github](https://github.com/goharbor/harbor-cli/tree/main/doc/cli-docs). |
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 | ||
|
Oops, something went wrong.