CircleCi
Orbs
Define the environment in which a job will run on, allowing you to reuse a single executor definition across multiple jobs.
An executor definition has the following keys available (some of which are also available when using the job declaration):
docker, machine, windows, or macos
environment
working_directory
shell
resource_class
Once you declare a definition of executor => you can use them in jobs in scope of declaration.
NOTE. Docker alpine tags: itβs a smaller version with the necessary minimum
version: 2.1
executors:
my-executor:
docker:
- image: circleci/ruby:2.4.0
jobs:
my-job:
executor: my-executor
steps:
- run: echo outside the executor
second-job:
executor:
name: my-executor
steps:
- run: echo outside the executorIt is possible to specify multiple images for your job. Specify multiple images if, for example, you need to use a database for your tests or for some other required service. In a multi-image configuration job, all steps are executed in the container created by the first image listed. All containers run in a common network and every exposed port will be available on localhost from a primary container.
Commands
A command defines a sequence of steps to be executed in a job, enabling you to reuse a single command definition across multiple jobs.
Jobs
With jobs, we can automate common behaviour using our commands described previously and they will be used in the workflows section of the CircleCI configuration.
Last updated
Was this helpful?