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
- Create
ci_artifacts
database table. - Migrate
ci_builds.artifacts_*
columns toci_artifacts
. - Make artifacts metadata a separate artifacts type.
- Make it possible to send multiple artifacts for a job using an internal runners API.