Search code examples
artifactoryjfrog-cli

When distributing a release bundle on Artifactory how do the edge nodes map to the jfrog CLI API?


I'm trying to distribute my release bundles using the jfrog CLI and based on how we have setup our Artifactory instance I'm not sure how the web interface maps to the [CLI API][1]. On the web interface it asks me to select the edge nodes I want to distribute to however, the API talks about sites, cities and country codes. My goal is to distribute to a single one of the edge nodes.

[1]: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Distribution#CLIforJFrogDistribution-DistributingaReleaseBundle%20(


Solution

  • The difference between the UI and REST API/CLI is that:

    1. Via UI the Distribution receives the list of available Destinations from Mission Control. Then, once you select any, it is automatically creates the pattern map that is submitted via REST API (/ui endpoint).
    2. REST API: you need to provide the Destinations in a form of patterns
    3. JFROG CLI: wrapping the API.

    The pattern build in the json (distribution_rules):

    1. "site_name": Destination name or wildcard (*)
    2. Every Destination has a city and Country that can be set in advance (when the Destination is registered). Wildcard supported as well.

    So, in your case site == edge, city and country code are optional params. See Mission Control API for getting list of Destinations: https://www.jfrog.com/confluence/display/JFROG/Mission+Control+REST+API#MissionControlRESTAPI-GetJPDList