# Config File

The configuration for Delta CI is defined by .delta.yml file in the root folder of your repository.

The YAML configuration file can either contain a workflow definition or a single job definition.

# Workflow

(maybe move to another page) A workflow is a collection of jobs. Each job has a unique name and can have dependencies between them.

A typical build & deploy setup would look at this.

jobs:
  build:
    steps:
      - ...
  deploy:
    after: build
    steps: ...
1
2
3
4
5
6
7

A job can depends on multiple jobs as well, for example.

jobs:
  test-frontend:
    steps:
      - ...
  test-backend:
    steps:
      - ...
  deploy:
    after: ['test-frontend','test-backend']
    steps: ...
1
2
3
4
5
6
7
8
9
10

# Jobs

The name of the job is defined by the key of jobs, its value is an object which can contain the following properties.

# docker

Required: no Type: string or object

If you want to use a docker container as your build environment, you could specify the docker image name as the value, for example:

docker: python:3.7
1

If you want to specify other options(TBD), you could also write the config like

docker:
  image: python:3.7
  ...
1
2
3

If you don't specify docker property, it will be run directly in a VM instead.

# machine

Required: no Type: object

By default, the job will run with 2vCPU and 4GB of RAM. You could change it as long as your account has the resource for it.

machine:
  vcpu: 6
  mem_mb: 16000 # RAM in MBs
1
2
3

The maximum vCPUs you could have for a single job is 64, however, any job that requires more than 12 vCPUs might be run on a server-class CPU that has a lower single-core performance.

The maximum RAM you could have for a single job is 126GB, however, any job that requires more than 62GB of RAM might be run on a server-class CPU that has a lower single-core performance.

# steps

Required: yes Type: array

Steps are the commands which will be executed in the build environment. You could specify each step as a command string or an object. For example:

docker: node:12
steps:
  - name: Restore dependencies
    run: npm ci
    when:
      change: '**/package*.json'
  - npm run test
  - name: Run a multi-line script
    run: |
      echo "starting the multi-line script"
      exit 0
  - run: ./slack_notify.sh
    when: always
1
2
3
4
5
6
7
8
9
10
11
12
13
Last Updated: 2/1/2021, 6:56:46 PM