Improve Gitlab CI pipeline
Closed this issue · 5 comments
Once we are making use of the new extend
keyword in the .gitlab-ci.yml
in our pipeline files, let's adopt the pipeline setup of this project accordingly.
The goal is to have
- efficient pipelines than run fast and make use of caching strategies via optimal configurations for
cache
andartificats
- Simplify and DRY out the yaml
My original point in the first PR about artifacts
was the question: Do we actually need any artifacts here? If yes, what for?
Yes, artifacts should be created by the build job and consumed by the release job.
ok, theoretically understood.
but practically our build_npm_package
and release
jobs are part of the same pipeline so we shouldn't need any artifacts because we don't need a later pipeline to access an earlier pipeline's output or am i missing something?
This could be done with cache
instead, yes.
However, I wanted to use the primitives as recommended https://docs.gitlab.com/ee/ci/caching/#cache-vs-artifacts
Ah, I see. Fair point. TIL 🤓
While the cache can be abused to pass intermediate build results between stages, there may be cases where artifacts are a better fit.