Confusing documentation for cache and artifacts
Hey guys!
I'm following changes on cache and artifacts since early ci-multi-runner and even that - I'm still confused on how to use this two and what are default behaviors. In documentation we can find dozen of definitions, which can be different depending on the paragraph. In most cases this are: build, stage, job, run. I'm out with it...
Tell me if I'm right:
- Build - is whole run of newly deployed changes that goes through all
.gitlab-ci.yml
. - Stage - is a part of build that wraps particular automation tasks (f.e. build or test).
- Job - is one task defined within particular stage.
- Run - is... what? A single run of job?
Now:
- We have one build.
- We can have multiple stages. Each stage is running one-by-one (as defined with
stages
). - We can have multiples jobs per stage. Jobs within stage can run parallel?
And:
- What is cache default behavior and when it's enabled?
- What is artifacts default behavior and when it's enabled?
- Are artifacts always uploaded to GitLab?
What I suggest:
- Create examples for common cache and artifacts use.
I would love to do it, but I simply can't understand how this whole things work. I failed to setup with only documentation:
- How to preserve cache between builds (like npm or bower packages, composer vendors etc.)?
- How to keep generated files from one stage to another?
If someone could explain this to me I'd love to create examples for documentation.
Now pardon me, I'm going to try all by trial and error method. :/