Distribute Application Version CLI
This command distributes an application version to a distribution target, such as an edge node.
| Parameter | Command / Description |
|---|---|
| Command-name | version-distribute |
| Abbreviation | |
| Command arguments: | |
application-key | The application key defined for the application. |
version | The application version to distribute. |
| Command options: | |
--city | [Default: *] Wildcard filter for site city name. |
--country-codes | [Default: *] Semicolon-separated(;) list of wildcard filters for site country codes. Country code doesn't expect country phone code, but codes in this format: US, GB, FR, etc. |
--create-repo | [Default: false] Set to true to create the repository on the edge if it does not exist. |
--dist-rules | [Optional] Path to a file, which includes the distribution rules in a JSON format. |
--mapping-pattern | [Optional] 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] 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 in the form of 1, 2 which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis. |
--site | [Default: *] Wildcard filter for site name. |
Distribution Rules Structure in JSON File
{
"distribution_rules": [
{
"site_name": "DC-1",
"city_name": "New-York",
"country_codes": ["1"]
},
{
"site_name": "DC-2",
"city_name": "Tel-Aviv",
"country_codes": ["972"]
}
]
}The Distribution Rules format also supports wildcards. For example:
{
"distribution_rules": [
{
"site_name": "*",
"city_name": "*",
"country_codes": ["*"]
}
]
}Site_name, city_name, and country_codes should not be empty. They may be either omitted or use wildcards.
Distribute Application Version Examples
Distribute an Application Version Example 1
Distribute the application named myApp with version 1.0.0. Use the distribution rules defined in the specified file.
jf apptrust version-distribute --dist-rules=/path/to/dist-rules.json myApp 1.0.0Distribute an Application Version Example 2
Distribute the application 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 apptrust version-distribute --dist-rules=/path/to/dist-rules.json --mapping-pattern="(*)/source/(*)" --mapping-target="{1}/target/{2}" myApp 1.0.0Updated about 19 hours ago
Did this page help you?
