Search code examples
gitlabcontinuous-integrationartifactory

Storing tagged artifacts with gitlab CI


I'm working on a C++ project that requires custom builds of QT and other large libraries.

Ordinarily, these libraries, binaries and dependencies would be uploaded to say artifactory and named something like QT6.static.tar.gz. When a gitlab CI/CD pipeline would start, it can pull down these dependencies and start a build.

I'm now in a situation where my only tool is gitlab. Artifacts in gitlab appear to be inextricably linked to the pipelines that created them.

I would like my CI workflow to be as follows :

  1. Git commit triggers pipeline with a variable that denotes which artifacts to use.
  2. If specified artifacts don't exist, start a job that creates them, then export the artifacts.
  3. Compile the code commit changes against the artifacts as normal.

I can somewhat replicate this by using the container registry and docker layer caching - but it seems a bit contrived. Alternatively, these built files could be stored in git LFS, but I also don't like that solution.


Solution

  • The Gitlab Generic Packages Registry allows you to publish generic files, like release binaries, in your project’s package registry. Then, install the packages whenever you need to use them as a dependency.

    see Gitlab Docs