3 ms·
Hi, interesting post, thanks. Sharing how you can do it with GitLab :) Start with defining artifacts in the job config, and download them directly in the MR dur
by dnsmichi 5y ago
Hi, interesting post, thanks. Sharing how you can do it with GitLab :) Start with defining artifacts in the job config, and download them directly in the MR during the review & QA process. https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html
build-job:
script:
- ./build-dist-artifacts.sh
artifacts:
paths:
- dist/*
Engineers can use `filter pipelines` to find specific branches, tags, etc. they are looking for.
Large binary files may consume lots of storage, and need regular cleanup. `expire_in` allows to control the cleanup in GitLab. For older builds, you can always retry the build job/pipeline, and generate artifacts on demand, i.e. when debugging a problem between older release versions.
This is helpful for tarballs, also RPM/DEB packages, etc - anything which requires time and knowledge to build manually on a local development environment. With GitLab API access, you can integrate the job artifacts into more automated workflows or custom index websites of your choice, leaving the storage as SSoT in GitLab.
https://docs.gitlab.com/ee/api/job_artifacts.html#download-a-single-artifact-file-from-specific-tag-or-branch https://docs.gitlab.com/ee/api/job_artifacts.html#download-a...
The job artifacts can be put into a cloud object storage, like S3, too. https://docs.gitlab.com/ee/administration/job_artifacts.html#using-object-storage https://docs.gitlab.com/ee/administration/job_artifacts.html...
Last but but not least: If you prefer building your own file index based on smaller sized artifacts, you could use GitLab Pages and follow this post: https://forum.gitlab.com/t/how-to-allow-directory-listing-on-gitlab-com-pages/20625/7 https://forum.gitlab.com/t/how-to-allow-directory-listing-on... to publish the artifacts and create an html index.
I've done a similar approach to publish custom code coverage reports in CI/CD in a past workshop: https://gitlab.com/gitlab-de/workshops/ci-monitoring-webcast-2020/-/blob/main/.gitlab-ci.yml#L80 https://gitlab.com/gitlab-de/workshops/ci-monitoring-webcast... - can be handy for reviews and QA checks too.