How can I make the Yum config file dynamic?
In order to have dynamic fields in your Yum configuration, you can create a file, (e.g.: 'yum.repo') and use our public API for populating the fields dynamically.
For example:
[Artifactory-${request.getRepoPath().getPath()}]
baseurl=${request.getServletContextUrl()}/${request.getRepoPath().getParent().getPath()}
enabled=1
gpgcheck=0
Then you can deploy the file to the desired location and mark it as Filtered, and each time that a user downloads this file it will automatically get the path that it was deployed on.
So, if I were to deploy this file on “yum-local/a/b/c,” the downloaded file would have the following content:
[Artifactory-platform_rpms/rhel/6Server/x86_64/test]
baseurl=http://{server}:{port}/artifactory/yum-local/
enabled=1
gpgcheck=0
Again this can be changed according to the public API