Circle CI

If you are already using Circle CI, the migration process is very straightforward once you have learned some key differences in how Delta Ci works.

# Configuration

Delta CI also uses a YAML file in your git repo to store configuration. We expect it to be named .delta.yml under the repo's root directory. Like Circle CI, we support multiple jobs in the config file, for example:

jobs:
  test:
    docker: deltacidocker/node:14
    steps:
      - name: Install Dependencies
        run: npm ci
        when.changed: "**/package*.json"
      - npm run test
  deploy:
    docker: deltacidocker/node:14
    after: test
    branch:
      only: production
    steps:
      - name: Install apt packages
        run: apt update && apt install -y jq rsync
        when: first_run
      - name: Install Dependencies
        run: npm ci
        when.changed: "**/package*.json"
      - npm run deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

The format is not very different from what you are used to with Circle CI. As you might have noticed, there are also some key differences.

# Implicit Workflow

In Circle CI's config, you have to define a workflow to manage the dependency between jobs. In Delta CI, you can just specify an after property under each job's definition, which takes a single job's name or an array of job names.

Similarly, if you want to restrict a certain job's execution to a specified branch, you also need to specify under the job instead of defining a workflow. We believe by getting rid of the explicitly defined workflows, the YAML config can be kept cleaner.

# Always On Caching

As you may have noticed, there's no caching setup in the config. Unlike Circle CI, we don't require you to configure it yourself. By default, we keep the disk persistent between build runs, just like your dev environment.

If you need to install some system packages to run your build, you only have to do it once, as the system state is persistent. This can be marked with a when: first_run property in steps.

For your project dependency installation, you can also optimize it to run only the dependency list change, with when.changed property as you can see in the example above.

# Workspace

Circle CI has a "persist to workspace" feature to share files between jobs in the same workflow. Delta CI also offers a similar and easier-to-use feature. In every job in the same workflow, there's a shared file system mounted at /__ci/workflow_shared. This folder is a network shared, all jobs can access the same content simultaneously.

Last Updated: 2/1/2021, 6:48:58 PM