Configure a VCS Repository Layout

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

A VCS repository requires 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

When you create a remote repository, you cannot change its layout. We recommend you define the layout before creating the repository.

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:

You can configure the Custom Layout, or simply copy the code snippet below into the relevant section in the Administration module, under Artifactory Settings | Repositories 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.

Searching for artifact versions using the REST API 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
        } ]
}