Parallelism

Pipeline steps are executed sequentially by default. You can optionally describe your build steps as a directed acyclic graph. In the below example we fan-out to execute the first two steps in parallel, and then once complete, we fan-in to execute the final step:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
kind: pipeline
type: ssh
name: default

server:
  host: 1.2.3.4
  user: root
  password:
    from_secret: password

steps:
- name: backend
  commands:
  - go build
  - go test

- name: frontend
  commands:
  - npm install
  - npm test

- name: publish
  commands:
  - docker build -t hello-world .
  - docker push hello-world
  depends_on:
  - frontend
  - backend

The above example is quite simple, however, you can use this syntax to create very complex execution flows.

Note that when you define the dependency graph you must configure dependencies for all pipeline steps.
Note that you can use conditional steps in your dependency graph. The scheduler automatically corrects the dependency graph for skipped steps.