Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino committed Jul 12, 2023
1 parent 05ac278 commit f4d8b16
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions documentation/CLI-for-JFrog-Lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,41 @@ The release bundle is named "myApp", version "1.0.0", of project "project0".
Use signing key pair "myKeyPair" and overwrite at conflict.

jf rbp --signing-key=myKeyPair --project=project0 --overwrite=true --sync=true myApp 1.0.0 PROD

### Distributing a release bundle

This commands allows distributing a release bundle to a target environment.

| | |
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Command-name | release-bundle-distribute |
| Abbreviation | rbd |
| Command options | |
| --create-repo | \[Default: false\]<br><br>Set to true to create the repository on the edge if it does not exist. |
| --dry-run | \[Default: false\]<br><br>Set to true to disable communication with JFrog Distribution. |
| --dist-rules | \[Optional\]<br><br>Path to a file, which includes the Distribution Rules in a JSON format.<br><br>**Distribution Rules JSON structure**<br><br>{<br> "distribution_rules": \[<br> {<br> "site_name": "DC-1",<br> "city_name": "New-York",<br> "country_codes": \["1"\]<br> },<br> {<br> "site_name": "DC-2",<br> "city_name": "Tel-Aviv",<br> "country_codes": \["972"\]<br> }<br> \]<br>}<br><br>The Distribution Rules format also supports wildcards. For example:<br><br>{<br> "distribution_rules": \[<br> {<br> "site_name": "*",<br> "city_name": "*",<br> "country_codes": \["*"\]<br> }<br> \]<br>} |
| --site | \[Default: *\]<br><br>Wildcard filter for site name. |
| --city | \[Default: *\]<br><br>Wildcard filter for site city name. |
| --country-codes | \[Default: *\]<br><br>Semicolon-separated list of wildcard filters for site country codes. |
| --insecure-tls | \[Default: false\]<br><br>Set to true to skip TLS certificates verification. |
| --mapping-pattern | \[Optional\]<br><br>Specify along with 'mapping-target' to distribute artifacts to a different path on the edge node. You can use wildcards to specify multiple artifacts. |
| --mapping-target | \[Optional\]<br><br>The target path for distributed artifacts on the edge node. If not specified, the artifacts will have the same path and name on the edge node, as on the source Artifactory server. For flexibility in specifying the distribution path, you can include [placeholders](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UsingPlaceholders) in the form of {1}, {2} which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis. |
| Command arguments | |
| release bundle name | Name of the Release Bundle to promote. |
| release bundle version | Version of the Release Bundle to promote. |


##### Examples

##### Example 1

Distribute the release bundle named myApp with version 1.0.0. Use the distribution rules defined in the specified file.

jf rbd --dist-rules=/path/to/dist-rules.json myApp 1.0.0

##### Example 1

Distribute the release bundle named myApp with version 1.0.0 using the default distribution rules.
Map files under the 'source' directory to be placed under the 'target' directory.

jf rbd --dist-rules=/path/to/dist-rules.json --mapping-pattern="(*)/source/(*)" --mapping-target="{1}/target/{2}" myApp 1.0.0
2 changes: 1 addition & 1 deletion utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ var flagsMap = map[string]cli.Flag{
},
DistRules: cli.StringFlag{
Name: DistRules,
Usage: "Path to distribution rules.` `",
Usage: "[Optional] Path to distribution rules.` `",
},
site: cli.StringFlag{
Name: site,
Expand Down

0 comments on commit f4d8b16

Please sign in to comment.