Configure VCS Repository Layout

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

VCS repositories require an appropriate repository layout to support a more hierarchical layout of the cached items.

To use a hierarchical layout for your repository, you can either use the built-in vcs-default layout that comes with Artifactory out-of-the-box, or define a Custom Layout. This will ensure that different maintenance features like Version Cleanup will work correctly.

Integration Benefits JFrog Artifactory and Git

Repository layout is final

Once a remote repository is created you cannot change it's layout so we recommend that you define it beforehand.

Built-in Custom Layout: vcs-default

Artifactory's built-in default layout for VCS repositories (vcs-default) can work with both GitHub and BitBucket.

Below is an example of a Custom Layout named vcs-default: VCS Layout repository .png

You can configure the Custom Layout, or simply copy the below code snippet into the relevant section in the Administration module, under Repository Management | Layouts.

<repoLayout>
        <name>vcs-default</name>
    <artifactPathPattern>[orgPath]/[module]/[refs<tags|branches>]/[baseRev]/[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]</artifactPathPattern>
    <distinctiveDescriptorPathPattern>false</distinctiveDescriptorPathPattern>
    <folderIntegrationRevisionRegExp>.*</folderIntegrationRevisionRegExp>
    <fileIntegrationRevisionRegExp>[a-zA-Z0-9]{40}</fileIntegrationRevisionRegExp>
</repoLayout>

If a repository package layout is in a corresponding folder hierarchy, the Artifactory Version Cleanup tool correctly detects previously installed versions.

VcsDeleteVersions.jpg

Searching for artifact versions using the REST API also works properly:

$ curl "http://localhost:8081/artifactory/api/search/versions?g=jquery&a=jquery&repos=github-cache"
{
        "results" : [ {
                "version" : "2.0.3",
                "integration" : false
        }, {
                "version" : "master-062b5267d0a3538f1f6dee3df16da536b73061ea",
                "integration" : true
        } ]
}