Concepts

Basic concepts of Snake CI.

There are three main components of a Snake CI pipeline definition: Pipeline, Stage and Job.

Pipeline

The Pipeline describes the entire software life-cycle using stages and jobs.

The pipeline is written in a YAML file called snake-ci.yaml and stored in the same repository. There is no need to connect or link the repository with Snake CI. The add-on automatically detects repositories that have the snake-ci.yaml file.

There can be only one pipeline for each repository, but it can consist of an unlimited number of stages.

Stages

Stages are blocks or groups of jobs. Every pipeline has the stages section with a list of stages to be executed. Each job has the stage field which points to the name of the stage. So, effectively, a stage is just a string that names a group of jobs.

Jobs

Job is a group of commands that are executed to accomplish the desired status (for example, to compile the program).

Jobs are the core components of every pipeline. Each job runs in an isolated container with a copy of the repository checked out to the commit that triggered the start of the pipeline.

A job contains a list of commands to be executed in the isolated container. For the job to be successful, every command must be finished successfully. Otherwise, the entire pipeline will fail and the remaining jobs will not be executed. Refer to the pipeline config reference for more details.

Runners and Containers

Snake Runner is an application that receives and executes jobs. The Snake CI add-on only schedules and shows them in the web interface. The runner does all the heavy job lifting like container management, job processing, and collecting logs.

In order to be scalable, cross-platform, and easy to use, we picked Docker Engine, which is a well-known and battle-tested solution for container management.

Snake CI allows you to set up any amount of runners to handle your CI/CD workload.


Last modified October 21, 2020