When distributing a Release Bundle to an Edge Node, the artifacts are placed under a repository whose name corresponds to the original source repository used during the build creation, rather than the repository it was later promoted to (e.g., "Repository B").
Example Scenario:
-
Artifacts for a build creation are initially uploaded to a repository named release-dev
-
A release bundle is created from this build and promoted to a different repository, promotion-repo.
-
After distributing the release bundle to the Edge Node, the artifacts are placed under the original release-dev repository instead of promotion-repo.
This behavior is expected, and it is the default behavior of the system. By default, the path mapping relies on the original source repository of the build artifacts rather than the repository they were most recently promoted to.
You can modify this behavior so that the distributed artifacts are mapped to the repository where the release bundle was last promoted. This requires switching the value of the default-path-mapping-by-last-promotion property from false to true in your Distribution configuration.
To implement this change, follow these steps on your Distribution server:
-
Navigate to the Distribution configuration directory:
cd $JFROG_HOME/distribution/var/etc/distribution/
-
Copy the template configuration file to create a new import file:
cp distribution.config.latest.yml distribution.config.import.yml
-
Open the newly created distribution.config.import.yml file in your preferred text editor and add:
default-path-mapping-by-last-promotion: true
-
Ensure the file permissions are correct by verifying that the owner is distribution:distribution. If it is not, apply the appropriate ownership using the following command:
sudo chown distribution:distribution distribution.config.import.yml
-
Restart the Distribution service for the changes to take effect.
Once these steps are completed, future release bundles distributed to an Edge Node will correctly place artifacts in a repository that matches the last repository the bundle was promoted to.