This starter kit has been deprecated in favour of the orb init
command
included in the CircleCI CLI, which pairs with the new Orb Project Template
to make it easier to start up an orb.
Read more about the new process
The Orb Starter Kit is a bash utility that makes creating your first orb a breeze!
What are orbs? 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.
This kit includes three main components:
Before getting started you will need the the following things:
1. Clone this repo into a new directory with the name of your orb:
git clone git@github.com:CircleCI-Public/orb-starter-kit.git My-Orb-Name
2. Create a new repository on GitHub with the same name. https://github.com/new
3. Run the orb-init.sh
script to begin.
The Orb Init script will automate the following tasks:
- Install and update the CircleCI CLI
- Request a CircleCI API token if none is currently set.
- Check to ensure git is installed and authenticated with GitHub.
- Connect your repository with the blank repo created in step 2.
- Create and switch to an "Alpha" branch
- Walk through creating a new orb via the CircleCI CLI
- Allow you to optionally enable advanced features.
- Create your customized config file
- Clean up - The script will remove itself from the repo for the next commit.
- Commit alpha branch with changes to GitHub.
Your orb will now be available at <your namespace>/<your orb>@dev:Alpha
The script will end by giving you a link to the running automated pipeline on your CircleCI account which will be building a "Hello World" orb.
4. Begin editing.
You may now edit the contents of the
/src
folder and commit your changes to theAlpha
branch or any non-master branch.
5. Build and test!
All commits to non-master branches will automatically result in the creation of a development orb under that branch. The automated pipeline will then run your integration tests against that newly created dev orb.
6. Publish!
Once ready to produce a new production version of your orb, you may merge your branch into the master branch to trigger the automated release process.
Recommended: If you have enabled the
fail-if-semver-not-indicated
option, your commit message when merging to master MUST include[semver:patch|minor|major|skip]
to designate the release type.You will need to manually publish the production version of your Orb for the initial version before the automated pipeline can update your production version later on. This is not needed on subsequent pushes.
Once the orb is complete, you will have two new Green workflows in your CircleCI account. The first one is for the initial setup and the second one will have produced a development version of your orb which contains a sample Command, Executor, and Job.
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.
Following are some resources to help you build and test your orb:
Explanation of all permissions required for the script.