docs icon indicating copy to clipboard operation
docs copied to clipboard

Use case: conditional testing of subcomponents

Open markoa opened this issue 7 years ago • 0 comments

This one comes up on support occasionally and would be a useful demo and addition to the Use cases section.

Scenario

  1. Scan changes in current revision and determine which subcomponents of our app need to be rebuilt.
  2. Launch parallel jobs that execute a bin/ci script that will run the test suite for each affected subcomponent.

Solution outline

  1. In the first block of a pipeline, run a script to determine which subcomponents need to be tested. Store that info in cache.
  2. 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.

markoa avatar Nov 18 '18 20:11 markoa