Skip to content

Implement Build Artifacts

I'm looking into implementing Build Artifacts as described here: https://dev.gitlab.org/gitlab/gitlab-ci/issues/56

We should consider resolving artifacts problem for following cases:

  1. Caching parts of the build (ex. gems),
  2. Passing artifacts between stages (compiled binary, gems, etc),
  3. Uploading build artifacts to GitLab CI (compiled binary, logs, or other dependent parts of the build)
  4. Creating release, similar to GitHub Releases.

This issue tries to resolve case 3

Taking excerpt about implementation details from original issue:

I want to do implement this as follow

  1. We introduce .gitlab-ci.yml attribute local to job:
build:
  script:
  - make
  artifacts:
  - path/to/bin
  1. We use nginx upload module. However this requires users to install nginx-extras (for Debian and Ubuntu).

  2. Runner uploads the artifacts using CURL to special API endpoint.

  3. The files will be visible on Build view and we will add additional tab on the right to Builds with all uploaded artifacts.

  4. By default no artifacts uploading will be done. I don't like specifying the default git ls-files -o, because in most cases artifacts are too big.

  5. By having base functionality we can later think about showing the artifacts in other places, viewing tag? adding releases page based on uploaded artifacts to tags?

Note about nginx upload

Support for Nginx upload module is problematic:

  1. On Debian/Ubuntu is only present in nginx-extras,
  2. On CentOS user most likely needs to compile nginx ourselves,
  3. On Omnibus we have own nginx.

I think that we can support dual-mode:

  1. If we detect that request was intercepted by nginx upload module we use fast path,
  2. If we also would support receiving request directly by Unicorn.

All Omnibus installations by default would use fast path. In source installation docs we would guide to configure fast path manually, by checking nginx version and updating nginx config.

/cc @jacobvosmaer @sytses @dzaporozhets @JobV