⚠️ This article was posted over a year go. The information might be outdated. ⚠️
Table of Contents
- Configuration options
- What are Jobs Steps and WorkFlows
- What are Orbs?
- Validate config in your local env
- Example
Configuration options
The link below contains CircleCI’s configuration options.
What are Jobs Steps and WorkFlows
Jobs
: Jobs are collections of steps. All of the steps in the job are executed in a single unit, either within a fresh container or VM.Steps
: Steps are a collection of executable commands which are run during a job.
What are Orbs?
According to the CircleCI’s official document, Orbs are
Orbs are reusable snippets of code that help automate repeated processes, speed up project setup, and make it easy to integrate with third-party tools.
So Orbs are basically like libraries. You can reuse the code that was written by somebody else.
Validate config in your local env
Run the command below.
$ circleci config validate
If you are working with Orbs you can also validate your orb:
$ circleci orb validate /tmp/my_orb.yml
Example
Here is a simple CircleCI configuration for a react project.
version: 2.1
# list orbs you want to use.
orbs:
node: circleci/node@1.1.6
jobs:
# This is the name of this job
jest:
# Executors define the environment in which the steps of a job will be run
executor:
name: node/default
# Following the usage example of circleci/node@1.1.6.
# https://circleci.com/orbs/registry/orb/circleci/node?version=1.1.6
steps:
- checkout
- node/with-cache:
steps:
- run: yarn install
- run: yarn test
workflows:
build-and-test:
jobs:
- build-and-test