Search code examples
devopsartifactory

Modules in Artifactory - What are they?


There's a concept in Artifactory of "Modules". In the UI, when you go to the "Builds" tab, and enter some specific build, you get a list of Module IDs, which is, from what i've seen, just the name of the build.

So when I do this:

jfrog rt upload --build-name Kuku --build-number 1 File.bin Repo/path/

I get a Build with name "kuku", the number "1", and inside I have a list of Module IDs, with only 1 entry - Kuku, and if I click on it then I can see the list of artifacts that are part of this build.

So my question is, what are these Modules? How can I add more modules (Or why should I) to a specific build?

Just mention that I'm using a Generic repo


Solution

  • Module are part of the JFrog build info open integration layer for the CI servers and build tools which is used for capturing build metadata.
    Build info can be captured using CI integrations, build tools, the JFrog CLI or the REST API. Once it is published to Artifactory, you can query it using the REST API, Artifactory Query Language (AQL) and GraphQL.
    As part of build info, a module is a way to group artifacts which where produced by as build and dependencies which where used when building them. A module, for example, can represent a micro service.

    The JFrog CLI, which you are already using, can be used for collecting build info.
    You can add artifacts when uploading them in the following way:

    jfrog rt upload --build-name Kuku --build-number 1 --module Momo File.bin Repo/path/
    

    And dependencies can be added when you are downloading them:

    jfrog rt dl "my-local-repo/yoyo.zip" kuku-dependencies/ --build-name Kuku --build-number 1 --module Momo
    

    To publish build info, use the following command:

    jfrog rt bp kuku 1