Orb Tools v12 Release: Enhanced Orb Publication Process & Reduced Contributor Friction
Orb: CircleCI Developer Hub - circleci/orb-tools
Release: Release v12.0.0 - Publish-less testing · CircleCI-Public/orb-tools-orb · GitHub
Key Updates
For a comprehensive list of updates, refer to the full changelog:
Significant Improvements:
- Development orbs no longer required for testing
- Introducing dynamic pipeline orb injection for testing
- Removes the barrier of needing publishing access for contributors to run tests
- Transition to snake_case
- Ensures consistency with CircleCI’s native config schema
- Parameterizable executors
- Enhanced customization options
- Customizable orb file names
- Facilitates publishing multiple orbs simultaneously
- Simultaneous push of multiple custom development tags
- Optional
checkout
step- Utilize
pre-steps
for job customization or to provide a custom checkout
- Utilize
- Customizable orb file names
Previously, in order to test your orb, a development version needed to be published prior to running integration/e2e tests for the orb via the dynamic test-deploy
workflow. Though the development orb publishing process was automated, it included a lot of friction for those who did not have access to the publishing token, mainly open source contributors. So in the past, if an open source contributor made a PR to an orb that would otherwise build (assuming build forked-prs is enabled), it would stop short of testing due to the lack of access to the private publishing token needed to publish the development version of the orb.
What was needed was a way to test the orb’s changes without requiring access to the publishing token for just development versions of orbs. Because we are already taking advantage of dynamic config, the test-deploy
workflow has the ability to be modified before it is executed. Using inline orbs, we now inject the source of the orb directly into the config, rather than referencing a publically accessible development tag.
test-deploy.yaml
version: 2.1
orbs:
orb-tools: circleci/orb-tools@12.0
# The orb definition is intentionally not included here. It will be injected into the pipeline.
<orb-name>: {}
...
Now, rather than referencing a development tag like had had in the past, we reference nothing ({}
) and it gets replaced at run-time with the full source of your orb. This functions essentially exactly the same as prior to this update but now the publish
job is no longer needed at all in the config.yaml
file.
Upgrading
If you have an existing orb you want to upgrade to orb tools 12, due to the major version changes, there will be several adjustments needed. The easiest approach is to take a look at the updated Orb Template used by new orbs as a reference for updating your orb’s config.
You can use the updated migration script for this release to automatically snake_case your orb’s components.
Building a new orb
Building a new orb works the same has it has before, get started with the circleci orb init
command. The latest version of the Orb Template with Orb Tools v12 will be pulled.
Docs: Orb Authoring Process - CircleCI