Search code examples
artifactory

Artifactory - Concept of File Versions


I'm currently starting with JFrog Artifactory. Up to now I have only been working with source code control systems not with binary repositories.

Can someone please tell how the versioning of files is done in Artifactory? I have been trying to deploy a file, then change it and deploy it again. The checksum has changed, so it's the new file. But it seems that the old version is gone.

So it looks like there are no version of files. If I want that do I have to do it in the filename?

I found versions related to packages. But I was thinking to use it for other files as well.

Thanks for your help Christoph


Solution

  • Artifactory, unlike a VCS system, is not managing a history of versions for a given path. When you deploy an artifacts over an existing artifact, it will overwrite it (you can block this by configuring the right permissions).
    If you wish to manage permission for generic artifacts (ones which are not managed by a known package manager like npm, Maven etc.), there are a couple of options you can take:

    1. Add the version as part of the artifact name, for example foo-1.0.0.zip
    2. Add the version as part of the artifact path, for example /foo/1.0.0/foo.zip
    3. Combine the 2 above approaches, for example /foo/1.0.0/foo-1.0.0.zip
    4. Use an existing package management tool which is flexible enough to handle generic packages. Many people are using Maven to manage all types of packages beyond Java ones (it comes with its pros and cons)

    From the Artifactory point of view there are a couple of capabilities you can leverage:

    1. Generic repositories - aimed at managing proprietary packages which are not managed by a known package manager
    2. Custom repository layout - can be used to define a custom layout for your generic repository and assist with tasks like automatic snapshot version cleanup
    3. Properties - can be used to add version (and other) metadata to your artifacts which can used for searching, querying,resolution and more

    Lastly, Conan is another option you should consider. Conan is a package manager intended for C and C++ packages. It is natively supported in Artifactory and can give you a more complete solution for managing your C libraries.