docs
docs copied to clipboard
Use case: conditional testing of subcomponents
This one comes up on support occasionally and would be a useful demo and addition to the Use cases section.
Scenario
- Scan changes in current revision and determine which subcomponents of our app need to be rebuilt.
- Launch parallel jobs that execute a
bin/ciscript that will run the test suite for each affected subcomponent.
Solution outline
- In the first block of a pipeline, run a script to determine which subcomponents need to be tested. Store that info in cache.
- In the second block, define jobs for all subcomponents. At the start of each job fetch data created in the first step, check whether current subcomponent should be tested and run ci script only if it’s true.
It’s a demo so subcomponents can simply be two subdirectories.