ProfessorKaos64
ProfessorKaos64

Reputation: 101

Sane RPM custom layout for Artifactory?

I am trying to come up with a sane layout for my RPMs that follow this path structure

<repo_name>/<module_name>/<module_name>-0.0.0-<epoch>.<arch>.rpm

For example, this is a test path:
rpm-rhel7-dev/python-opstools/python-opstools-2.7.6-1.noarch.rpm

Anyone have any hints?

Related documentation https://www.jfrog.com/confluence/display/RTF/Repository+Layouts

Upvotes: 1

Views: 277

Answers (1)

ProfessorKaos64
ProfessorKaos64

Reputation: 101

  1. Cleared all packages from 'my-repo'
  2. Created layout 'rpm-default'
  3. Artifact Path Pattern:

    [orgPath]/[module]-baseRev-[classifier].[ext]

  4. Folder Integration Revision RegExp

    .*

  5. File Integration Revisino RegExp

    .*

Once I did this and assigned this layout to my empty repo, I pushed to this path (Jenkins):

       upload_spec = """{
            "files": [
                {
                    "pattern": "$RPM_ROOT/*.rpm",
                    "target": "$REPO_NAME/my-module/"
                }
            ]
        }"""

Where RPM root is your path to RPM/RPMs per documentation:

The key here is to make sure you have a module ID after a push:

Module ID: python-opstools:python-opstools:2.8.0:1

After this, you should see versions to delete or manage when right click the module folder / repo root. Don't ask me yet how to fully deconstruct all the pieces fo the path pattern :P, instead, refer to the documentation:

https://www.jfrog.com/confluence/display/RTF/Repository+Layouts

Upvotes: 2

Related Questions