Basic Concepts of CircleCI: Part 1
CircleCI is a continuous integration and delivery tool. The following are some basic concepts of CircleCI. Half of them shall be covered in this post. There shall be a part 2, which shall be cover the remaining concepts.
- configuration,
- steps,
- executors,
- jobs,
- workflows,
- orbs,
- caches,
- contexts.
Configuration
The configuration for CircleCI is provided through a .yaml file. The configuration file is placed in the .circleci/config.yaml. It follows the concept of configuration as code.
Steps
Steps are the smallest unit of execution in a config.yaml file. The most common step is checkout which means checking out the source code from the repository. A step could also be linux commands, in which case, these are preceded by a run: keyword.
Some of the other common keywords are:
- save_cache,
- restore_cache,
- deploy,
- store_test_results,
- add_ssh_keys,
- attach_workspace.
Executors
Executors are environments that are used to run separate jobs in. These could be:
- VMs running operating systems like Linux, macOS or Windows, or
- Docker containers.
Jobs
A job is run within a separated unit like a VM or container. Some of the components of a job configuration included under a job are:
- executors,
- steps,
- environment,
- parameters.
- Caching between different runs of a job persists, making it faster to test builds.
- Artifacts persist after running a workspace
Workflows
Workflows are a collection of jobs. They contain the following keys:
- version
- jobs
The remaining concepts will be covered in Part 2 of this post.