Automatically Create Missing Repositories

JFrog Distribution Documentation

Products
JFrog Distribution
Content Type
User Guide
ft:sourceType
Paligo

Distribution fails when the target edge or source Artifactory does not contain any repositories. From JFrog Distribution release 2.8.1, Distribution enables you to create missing target repositories automatically on the target edges or source Artifactory when distributing Release Bundles to expedite the distribution flow. (This feature requires JFrog Artifactory version 7.38.8 or later.)

How does it work?

During the distribution flow, select the Auto create missing repositories checkbox to create missing repositories automatically (prior to release 2.14.1, this checkbox was called Target Repository Auto-Creation).

Automatic creation of missing repositories is particularly useful when you first begin using Distribution. By default this function is not selected to give you better control of the targets where you are distributing Release Bundles.

DIST-Distribute_RB.png

This feature works according to the path mapping that exists from the source to the target. If advanced path mapping was detected, the target repository cannot be auto-created. To enable automatic creation, set thedistribute.auto-create-target-repo-advance flag to true in the Distribution Application Config YAML File.Distribution Application Config YAML File

Repositories

Without Path Mapping

With Path Mapping

One Repository

If the target repository name and type are the same as the source repository, the repository is created automatically.

If there is a one-to-one path mapping between the source repository and target repository, the target repository type will be the same as the source repository type.

Multiple Repositories

If the target repositories names and types are the same as the source repositories, the repositories are created automatically.

  • If all repositories are the same repository type in the source and are mapped to one target repository, the target repository created will be the same type as the source with the name specified by the user.

  • If all repositories in the source are different repository types and are mapped to one target repository, the target repository created will be a generic repository.

Examples

Example 1: From source to target repository without path mapping

A Docker image from a Docker repository in the source will be mapped to the Docker repository in the target.

Example 2: From source to target repository with path mapping

A Docker image from a Docker repository named docker-local in the source will be mapped to a Docker repository named mapped-docker-loca in the target.

Example 3: Multiple repositories on the source to one target repository with path mapping

Multiple Docker images from multiple Docker repositories in the source are mapped to a single Docker repository in the target.

Example 4: Multiple repository types on the source to one target repository with path mapping

A Docker image from a Docker repository and a Helm chart from a Helm repository in the source will be mapped to one generic repository.