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:
- Caching parts of the build (ex. gems),
- Passing artifacts between stages (compiled binary, gems, etc),
- Uploading build artifacts to GitLab CI (compiled binary, logs, or other dependent parts of the build)
- Creating release, similar to GitHub Releases.
This issue tries to resolve case 3
Taking excerpt about implementation details from original issue:
- You can set 'artifacts to upload' filter with the artifacts attribute in .gitlab-ci.yml
- The default is similar to travis with git ls-files -o to upload all untracked files, but people can also set something explicit such as log/:coverage/ if you want multiple ones https://github.com/travis-ci/artifacts#example-logs-and-coverage
- A curl command to upload the files to the CI coordinator via the API is appended to the build script (no executables or changes to runner needed)
- The files are accessible from the build page
- If there are files in the release/ directory these are send to GitLab itself and stored under the tag, see http://feedback.gitlab.com/forums/176466-general/suggestions/4156755-releases-with-binary-files-like-on-github
- If people want to use releases/ instead of release/ I can live with that
I want to do implement this as follow
- We introduce
.gitlab-ci.ymlattribute local to job:
build: script: - make artifacts: - path/to/bin
nginx upload module. However this requires users to install
nginx-extras(for Debian and Ubuntu).
Runner uploads the artifacts using CURL to special API endpoint.
The files will be visible on Build view and we will add additional tab on the right to Builds with all uploaded artifacts.
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.
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:
- On Debian/Ubuntu is only present in nginx-extras,
- On CentOS user most likely needs to compile nginx ourselves,
- On Omnibus we have own nginx.
I think that we can support dual-mode:
- If we detect that request was intercepted by nginx upload module we use
- 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.