Distribute an Application Version
Distribute an AppTrust application version to remote targets with distribution rules.
This topic covers the following tasks:
Distribute an Application Version
Distribution rules determine which targets receive the version. A rule can match a target by site_name, city_name, country_codes, or groups. country_codes and groups are lists. Country codes are values such as US. Use * when a rule should include every value for a field. If you omit site_name or city_name, the rule matches every value. If you omit country_codes, the rule matches every country code. When you need to reach more than one set of targets, add another rule.
You can set a priority of low, medium, or high on the distribution or on a rule. One set of targets is then distributed ahead of another.
Prerequisites
- An application version exists in AppTrust.
- At least one distribution target, such as an Edge service, is available.
- You have read and execute permissions on the application version, and distribute permission on at least one destination the rules select.
To distribute an application version:
-
Choose the targets with one or more distribution rules.
-
Distribute the version with the Distribute Application Version API or the JFrog CLI. For the command syntax and examples, see Distribute Application Version CLI.
jf apptrust version-distribute --dist-rules=<PATH_TO_RULES> <APPLICATION_KEY> <VERSION>Where:
<PATH_TO_RULES>: The path to the distribution rules file<APPLICATION_KEY>: The application key<VERSION>: The application version
For example:
jf apptrust version-distribute --dist-rules=/path/to/dist-rules.json myApp 1.0.0
You can also check the request without distributing, create missing repositories on the targets, bypass the Xray scan check, include evidence, or change the target path, the target project, or whether the distributed content is read-only. For those fields, see Distribute Application Version API.
You can also list the distributions for a version, view the details of a distribution, abort a distribution, or change its priority.
Delete a Distributed Application Version
You can delete a distributed application version from the remote targets you select. The application version remains available on the source JFrog Platform. When you want to remove the version from the source JFrog Platform, see Delete an Application Version.
Prerequisites
- The application version is distributed to at least one remote target.
- You have delete permissions on the application version and on the relevant remote targets.
To delete a distributed application version:
-
Choose the remote targets with one or more distribution rules.
-
Delete the version from those targets with the Remote Delete Application Version API or the JFrog CLI. For the command syntax and examples, see Delete Remote Application Version CLI.
jf apptrust version-delete-remote --dist-rules=<PATH_TO_RULES> <APPLICATION_KEY> <VERSION>Where:
<PATH_TO_RULES>: The path to the distribution rules file<APPLICATION_KEY>: The application key<VERSION>: The application version
For example:
jf apptrust version-delete-remote --dist-rules=/path/to/dist-rules.json myApp 1.0.0
Frequently Asked Questions
This section provides answers to frequently asked questions about distributing application versions.
FAQs
Q: How do I distribute an application version?
A: Choose the targets with distribution rules, then run jf apptrust version-distribute or call the Distribute Application Version API. For the steps, see Distribute an Application Version.
Q: What fields can a distribution rule use?
A: A rule can use site_name, city_name, country_codes, and groups. Country codes are values such as US. Use * to include every value for a field.
Q: What does a priority on a distribution rule do?
A: A priority of low, medium, or high decides which set of targets is distributed ahead of another. You can set it on the distribution or on an individual rule.
Q: Which permission do I need to distribute an application version?
A: You need read and execute permissions on the application version, and distribute permission on at least one destination the rules select.
Q: What happens to the source version when I delete it from a remote target?
A: The version is removed from the remote targets you select and remains available on the source JFrog Platform. To remove it from the source, see Delete an Application Version.
Related Topics
Updated 7 days ago
