Skip to content

Make it possible to store multiple artifacts for a build

Description

Currently it is possible to store only one artifacts archive for given CI/CD build. Artifacts can have artifacts metadata that we consider to be an extensions of original artifacts archive file. These are however separate concepts, and we can treat artifacts metadata as a separate build artifacts.

We should create build -> has many -> artifacts association, and add artifacts type field to the database.

We need it to make a better us of CI artifacts, and to implement arbitrary build results in the future. We talked about this with @ayufan and it seems that is an important ~backstage improvement that we need to build many features on top of that. We also consider this to be important to solve problems of flaky tests in GitLab, see https://gitlab.com/gitlab-org/gitlab-ce/issues/32308.

Proposal

  1. Create ci_artifacts database table.
  2. Migrate ci_builds.artifacts_* columns to ci_artifacts.
  3. Make artifacts metadata a separate artifacts type.
  4. Make it possible to send multiple artifacts for a job using an internal runners API.

Links / references

https://gitlab.com/gitlab-org/gitlab-ce/issues/13227

/cc @ayufan @bikebilly @markpundsack