Loading
Add a collector for bundled catalog components
What does this MR do and why?
First step of replacing compiled catalog bundles with collected ones: Gitlab::Ci::Catalog::Bundle::Collector gathers a component's entry file and every local: file it includes, as authored. It is not used yet; the next MR swaps it in for Gitlab::Ci::Catalog::Bundle::Compiler.
- Walks only each file's top-level
include:and ignoresrules:, so rule-guarded files are collected too - Keys files the way
File::Localreads them, without a leading slash - Rejects non-
local:includes, locations only known when the pipeline runs, wildcard locations,spec:include, andrules:existswithoutproject: - Rejects missing, empty or invalid files, and more files than
ci_max_includes - Reports every rejection in one
CollectError, naming the file and the include
References
- Related to #630810 (closed)
How to set up and validate locally
bundle exec rspec spec/lib/gitlab/ci/catalog/bundle/collector_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Avielle Wolfe