In August, we released the
orb pack command, to make authoring orbs easier
through the use of including scripts and enforcing an orb structure. Today, we
are pleased to say we are making the process even easier to get started with a
orb init. This is available as of CircleCI CLI v0.1.9988.
In the early days of orbs, they were typically authored as a single
file, or used the
config pack command in the CircleCI CLI to bring together a
directory of files into one. We eventually introduced an “orb starter kit”,
which is a collection of shell scripts for getting a new orb up and running,
and while this was primarily intended for first party use or partners, there
was some minor adoption within the community. With our ongoing mission to make
orb development more accessible through our “Orb Development Kit” initiative,
we are building out a new flow, which leverages a new Orb Project Template
to get you up and running even faster.
We have also updated our orb authoring docs to include this new command, and generally overhaul the information provided: https://circleci.com/docs/2.0/orb-author
What does orb init do?
orb init behaves very similar to other “init” commands within other
development tools. First, it fetches the latest version of the Orb Project
Template, then walks you through setting up the neccesary values for
publishing, CI/CD secrets and configuration, and gives clearer instructions for
what to do next. We are doing our best to make the process as seamless as
possible, but due to technical limitations there may be some minor issues we
are unable to iron out.
Ideally, upon finishing the
orb init flow, you will have a fully functional
orb that, once pushed to, will publish a new version to the orb registry. If
you experience any shortcomings in our approach, please let us know!
To call the
orb init command, simply provide a path where you would like your
new orb to reside:
$ circleci orb init my-new-orb
Here is a quick asciinema recording demonstrating the workflow:
- Currently, we can’t automatically push to git repositories. This is a
limitation of the git library we are using to manage the automation of the git
project for the orb, and is unlikely to change. Clear instructions are present
to guide through the final steps.
What is the Orb Development Kit?
The Orb Development Kit is a collection of utilities to make orb authoring a
much easier process. It encompases the
init commands, along with
the new Orb Project Template and the
orb-tools orb for handling the CI/CD
process. The ODK is not a single piece of software or a library, but a family
of tools to author and publish orbs more seamlessly.