Search code examples
artifactoryartifactjfrog-clijfrog-xray

Jfrog Remote repository with multiple contexts paths


In jfrog remote repository, Can we have a single remote repo to resolve multiple paths of the remote repo urls?

for example, I need to create a single repo in jfrog, where as all the below paths of the remote repo is accessible to browse.

https://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/ 
https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64
https://public-yum.oracle.com/repo/OracleLinux/OL7/optional/latest/x86_64
https://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/repodata/
https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/repodata/
https://public-yum.oracle.com/repo/OracleLinux/OL7/optional/latest/x86_64/repodata/

Tried with remote repo pointing to "https://public-yum.oracle.com/repo/OracleLinux/OL7/: but no luck


Solution

  • You can have a single remote pointing to "https://public-yum.oracle.com/repo/OracleLinux/OL7/" but since the local repo config file (/etc/yum.repos.d/my.repo) should point to the path of the repodata folder you will need to have several configuration files each of them pointing to a different path. So for the first two repositories you mentioned, you can have the following two local conf files:

    latest.conf:

    [latest]
    name=latest
    baseurl=http://admin:password@my-jfrog-url/artifactory/rpm-remote/latest/x86_64/
    

    addons.conf

    [addons]
    name=addons
    baseurl=http://admin:password@my-jfrog-url/artifactory/rpm-remote/addons/x86_64
    
    

    The above conf files point to the same repository but each file to a different path.