Build Pipelines

Usage Scenarios

Build Pipelines allow Solano CI users to define complex execution orders of build steps (Build Profiles and Plans). Pipelines are extremely useful in their ability to separate build steps and create testing dependencies. Previously, Solano CI allowed users to create linear dependencies in the execution of Build Profiles. With the introduction of Build Pipelines, users will now be able to create branching and multiple dependencies.

Build Pipelines represent a Directed Acyclic Graph - each individual step is defined as a Build Profile. The execution order of the profiles is defined under the “pipeline” key in the configuration file. The Build Glan lives within your configuration file and will be reevaluated prior to each execution.

Using YAML hashes and arrays, you can easily define a tree structure for pipeline execution. Profile steps that are defined in an array will be run in parallel. Profile steps defined as key:value hash pairs will be run linearly.

Note

the number of builds that can run in parallel at once depends on the number of concurrent sessions allowed by your subscription plan

If you want your tree structure to “collapse” or “fan-in” to a single profile step, you can define individual dependencies using the edges key in your configuration. edges can be a defined as a list of Key : Value pairs, ‘key’ being the profile that must successfully pass before the ‘value’ profile runs.

Note

cyclic dependencies and duplicate profile steps are not allowed in Build Pipelines

The Build Pipeline will continue execution if all of the profiles leading into any one profile successfully pass. A full Build Pipeline execution will only succeed if all profile steps pass.

Example Pipelines

Linear pipeline

../../_images/linear.png
profiles:
  a:
    tests:
      - "exit 0"
  b:
    tests:
      - "exit 0"
  c:
    tests:
      - "exit 0"
pipeline:
  a:
    b: c

Two linear pipelines in parallel

../../_images/two-parallel-linear.png
profiles:
  a:
    tests:
      - "exit 0"
  b:
    tests:
      - "exit 0"
  c:
    tests:
      - "exit 0"
  d:
    tests:
      - "exit 0"
  e:
    tests:
      - "exit 0"
  f:
    tests:
      - "exit 0"
pipeline:
  a:
    b: c
  d:
    e: f

Single profile that leads to 3 parallel profiles, that lead to a final single profile (fan out fan in)

../../_images/fan-out-fan-in.png
profiles:
  a:
    tests:
      - "exit 0"
  b:
    tests:
      - "exit 0"
  c:
    tests:
      - "exit 0"
  d:
    tests:
      - "exit 0"
  e:
    tests:
      - "exit 0"
pipeline:
  a:
   - b: e
   - c
   - d
edges:
  - c: e
  - d: e

Pyramid (Fan out)

../../_images/fan-out.png
profiles:
  a:
    tests:
      - "exit 0"
  b:
    tests:
      - "exit 0"
  c:
    tests:
      - "exit 0"
  d:
    tests:
      - "exit 0"
  e:
    tests:
      - "exit 0"
  f:
    tests:
      - "exit 0"
  g:
    tests:
      - "exit 0"
pipeline:
  a:
    b:
      - d
      - e
    c:
      - f
      - g

Inverted pyramid (Fan in)

../../_images/fan-in.png
profiles:
  a:
    tests:
      - "exit 0"
  b:
    tests:
      - "exit 0"
  c:
    tests:
      - "exit 0"
  d:
    tests:
      - "exit 0"
  e:
    tests:
      - "exit 0"
  f:
    tests:
      - "exit 0"
  g:
    tests:
      - "exit 0"
pipeline:
  - a
  - b
  - c
  - d
  - e
  - f
  - g
edges:
  - a: e
  - b: e
  - c: f
  - d: f
  - e: g
  - f: g

Build Pipelines Color Legend:

Build passed

../../_images/passed.png

Build running

../../_images/running.png

Build queued

../../_images/queued.png

Build error

../../_images/error.png

Build failed

../../_images/failed.png

Build not initiated

../../_images/not-run.png

Compatability

Long-time users of Build Profiles and Plans can immediately begin using pipelines by switching the plan key in their configuration file to pipeline. The main impact of switching is that linear plans must be rewritten. Plans defined as a YAML array will no longer represent linear execution, and will instead be intrepreted as parallel execution.

Please contact support if you’d like pipeline execution turned on for your existing plan definitions, or if you have any questions about Build Pipelines.