7. 2. Caching
You can use caching to, well,
cache stuff between jobs.
But you can also specify if
you want to push or pull stuff
to cache using policy key.
default:
cache: &global_cache
key: $CI_COMMIT_REF_SLUG
paths:
- .cache/pip
- some/other/path/
policy: pull-push
job:
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
8. 2. Caching with Fastzip
For caching/artifacts, you
can choose different level
of compression (low level of
compression runs faster, but
results in a larger zip file).
variables:
FF_USE_FASTZIP: "true"
# Available options are:
# fastest, fast, default, slow,
# or slowest
ARTIFACT_COMPRESSION_LEVEL: "fastest"
CACHE_COMPRESSION_LEVEL: "fastest"
9. 3. Split slow tests into multiple jobs
• Make MR pipelines fast and main branch pipelines
thorough.
10. 3. Split slow tests into multiple jobs
• Make MR pipelines fast and main branch pipelines
thorough.
• Or run the slow tests at the end of the test suite
(https:/
/stackoverflow.com/a/61539510)
11. 4. Hidden jobs and anchors
Allows you to reuse parts of the config
20. 5. Runners
• Very easy to set up and use (it's just a binary)
• Save you money if you run many jobs
21. 5. Runners
• Very easy to set up and use (it's just a binary)
• Save you money if you run many jobs
• Allows for much more flexibility (e.g. access to
proprietary code on your servers)