This orb starter kit will help you write your own orb.
Orbs are reusable commands, executors, and jobs (as well as usage examples)—snippets of CircleCI configuration—that can be shared across teams and projects. See CircleCI Orbs, Explore Orbs, Creating Orbs, and Using Orbs for further information.
Before getting started, we assume you have CircleCI account and that you have git
installed locally.
orb-starter-kit-master
folder to match the name of your new GitHub repositorycd
into the renamed folder and run git init
to initalize it as a new local git
repositorygit
repository to the blank GitHub repository you created earlier:git remote add origin git@github.com:$YOUR_GITHUB_USERNAME/$YOUR_GITHUB_REPOSITORY.git
git push -u origin master
config.yml
in the .circleci
directory with the one in the repository's root, or run the included replace-config.sh
scriptIf you haven't already installed the CircleCI CLI, created an orb namespace, and/or registered your orb name with the orb registry, this repository includes scripts to help you do so, all located in the orb-setup-scripts
directory.
install-cli.sh
script to install and configure the CircleCI CLIcreate-namespace.sh
script like this:bash create-namespace.sh your-desired-namespace your-github-org
create-orb.sh
script like this:bash create-orb.sh your-namespace/your-desired-orb-name
Note: to create a namespace or an orb, you must have owner/admin privileges in the GitHub org to which it is linked
This orb provides a basic directory/file structure for a decomposed orb (where commands, jobs, examples, and executors each live in their own YAML file). Create each of your commands, jobs, examples, and executors within the requisite folders in the src
directory.
On every new pushed commit, src
will automatically be linted via yamllint
, packed into a single orb.yml
file, validated by the circleci
CLI, and, if valid, published as a dev
release to the orb registry.
Following are some resources to help you build and test your orb: