Orbs are authored with similar YAML syntax to the base CircleCI build configuration. Each orb also has its own namespace to use when invoking its elements. Orbs are typically packaged as a single file, can also be locally defined inside configs or other orbs. There is support for packing multiple files together for large orbs.
Orbs are composed of one or more of the following elements, each of which represents a type of invocable element in CircleCI project configuration:
An example orb:
# foo orb
description: A hello-world orb example
commands:
echo:
steps:
- run: echo "hello world"
jobs:
hello:
machine: true
steps:
- echo
Note that the example orb shown above has a single command name echo
and a single job named hello
.
Orb, command, job, executor, and parameter names can only contain lowercase letters a-z, digits, and _ and -, and must start with a letter.
An orb foo
effectively has a namespace called foo
for use in your build configuration, and everything directly inside an orb is considered local to that orb.
The /
character is used as the scope delimiter. For instance:
foo/bar
would look forbar
in thefoo
orb.bar
would look forbar
in the local configuration scope.