-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/README.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,11 @@ | ||
# CLI for JFrog Platform Services | ||
|
||
This page describes how to use JFrog CLI with JFrog Platform Services. | ||
|
||
Read more about JFrog CLI [here](https://jfrog-external.fluidtopics.net/r/help/JFrog-CLI/JFrog-CLI). | ||
|
||
**Managing Workers** | ||
|
||
JFrog CLI allows you to fully manage your platform workers. | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
...ations/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-add-secret.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,22 @@ | ||
# Add worker secret | ||
|
||
## Overview | ||
|
||
This command is used to edit a worker manifest to add secret that can be used for deployment or/and execution. | ||
|
||
| | | | ||
|------------------------|---------------------------------------------------------| | ||
| Command name | worker add-secret | | ||
| Abbreviation | worker as | | ||
| **Command options:** | | | ||
| `--edit` | \[Default: false] Whether to update an existing secret. | | ||
| **Command arguments:** | | | ||
| secret-name | The secret name | | ||
|
||
## Example | ||
|
||
Add a secret name `my-secret` to a worker initialized in the current directory. | ||
|
||
``` | ||
jfrog worker add-secret my-secret | ||
``` |
22 changes: 22 additions & 0 deletions
22
...plications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-deploy.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,22 @@ | ||
# Deploy a worker | ||
|
||
## Overview | ||
|
||
This command is used to update the worker definition (code, description , filter, secret ...) on your Artifactory instance. | ||
|
||
| | | | ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker deploy | | ||
| Abbreviation | worker d | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
| `--no-secrets` | \[Default: false] Do not use registered secrets. | | ||
|
||
## Example | ||
|
||
Deploy a worker to server with id `my-server`. | ||
|
||
``` | ||
jfrog worker server deploy --server-id my-server | ||
``` |
24 changes: 24 additions & 0 deletions
24
...lications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-dry-run.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,24 @@ | ||
# Test a worker | ||
|
||
## Overview | ||
|
||
Dry run a worker. The worker needs to be initialized before running this command. | ||
|
||
| | | | ||
|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker dry-run | | ||
| Abbreviation | worker dr | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
| `--no-secrets` | \[Default: false] Do not use registered secrets. | | ||
| **Command arguments:** | | | ||
| json-payload | The json payload expected by the worker. Use `-` to read the payload from standard input. Use `@<file-path>` to read from a file located at <file-path>. | | ||
|
||
## Example | ||
|
||
Dry run a worker initialized in the current directory, with a payload located in a file named `payload.json` from the same directory. | ||
|
||
``` | ||
jfrog worker dry-run @payload.json | ||
``` |
25 changes: 25 additions & 0 deletions
25
...lications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-execute.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,25 @@ | ||
# Execute an HTTP-triggered worker | ||
|
||
## Overview | ||
|
||
Execute an HTTP-triggered worker. | ||
|
||
| | | | ||
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker execute | | ||
| Abbreviation | worker exec, worker e | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
| **Command arguments:** | | | ||
| worker-key | The worker key. If not provided it will be read from the `manifest.json` in the current directory. | | ||
| json-payload | The json payload expected by the worker. Use `-` to read the payload from standard input. Use `@<file-path>` to read from a file located at <file-path>. | | ||
|
||
## Example | ||
|
||
Execute an HTTP-triggered worker initialized in the current directory, with a payload located in a file named `payload.json` from the same directory. | ||
|
||
``` | ||
jf worker execute @payload.json | ||
``` | ||
|
24 changes: 24 additions & 0 deletions
24
...applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-init.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,24 @@ | ||
# Initialize a Worker | ||
|
||
## Overview | ||
|
||
This command is used to initialize a new platform worker. | ||
|
||
| | | | ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker init | | ||
| Abbreviation | worker i | | ||
| **Command options:** | | | ||
| `--force` | \[Default: false] Whether to overwrite existing files. | | ||
| `--no-test` | \[Default: false] Whether to skip tests generation. | | ||
| **Command arguments:** | | | ||
| action | The action that will trigger the worker (BEFORE_DOWNLOAD, AFTER_DOWNLOAD, BEFORE_UPLOAD, AFTER_CREATE, AFTER_BUILD_INFO_SAVE, AFTER_MOVE, GENERIC_EVENT, BEFORE_CREATE_TOKEN, ...). | | ||
| worker-name | The name of the worker | | ||
|
||
## Example | ||
|
||
Initialize a new BEFORE_DOWNLOAD worker named `my-worker`. | ||
|
||
``` | ||
jfrog worker init BEFORE_DOWNLOAD my-worker | ||
``` |
21 changes: 21 additions & 0 deletions
21
...ations/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list-event.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,21 @@ | ||
# List events | ||
|
||
## Overview | ||
|
||
This command list all the available events on your Artifactory. | ||
|
||
| | | | ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker list-event | | ||
| Abbreviation | worker le | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
|
||
## Example | ||
|
||
List event supported by a server identified by `my-server`. | ||
|
||
``` | ||
jfrog worker list-event --server-id my-server | ||
``` |
23 changes: 23 additions & 0 deletions
23
...applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list.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,23 @@ | ||
# List registered workers | ||
|
||
## Overview | ||
|
||
List workers saved on your Artifactory instance. The default output is a CSV format with columns `name`,`action`,`description`,`enabled`. | ||
|
||
| | | | ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker list | | ||
| Abbreviation | worker ls | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--json` | \[Default: false] Whether to use JSON instead of CSV as output. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
|
||
|
||
# Example | ||
|
||
List all workers registered in a platform named `my-platform` with detailed data. | ||
|
||
``` | ||
jfrog worker list --server-id my-platform --json | ||
``` |
23 changes: 23 additions & 0 deletions
23
...ications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-undeploy.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,23 @@ | ||
# Undeploy a worker | ||
|
||
## Overview | ||
|
||
This command is used to remove a registered worker from you Artifactory instance. | ||
|
||
| | | | ||
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Command name | worker undeploy | | ||
| Abbreviation | worker rm | | ||
| **Command options:** | | | ||
| `--server-id` | \[Optional] Server ID configured using the config command. | | ||
| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | | ||
| **Command arguments:** | | | ||
| worker-key | \[Optional] The worker key. If not provided it will be read from the `manifest.json` in the current directory. | | ||
|
||
## Example | ||
|
||
Undeploy a worker name `my-worker` from an Artifactory instance identified by `my-server`. | ||
|
||
``` | ||
jfrog worker undeploy --server-id my-server my-worker | ||
``` |