This post was written by Chris Smith. It originally appeared on the Pulumi blog, and has been republished here with his permission. We hope you enjoy!
On November 7, 2018, CircleCI announced the launch of Orbs, which allow you to create reusable components for CircleCI workflows. Orbs enable you to simplify your CI/CD configuration by reusing existing orb jobs or commands, in much the same way that Pulumi enables you to simplify the delivery of your cloud native infrastructure by sharing and reusing existing components.
You can see the Pulumi orbs in action in the following CircleCI
version: 2.1 Orbs: pulumi: firstname.lastname@example.org jobs: build: docker: - image: circleci/node:7.10 working_directory: ~/repo steps: - checkout - pulumi/login - run: command: | npm install npm run build - pulumi/update: stack: website-prod
First, the Pulumi orbs (and the fixed version) are referenced by the name
email@example.com. Then, the two Pulumi orbs
pulumi/update are invoked as
steps in the
The Pulumi CircleCI orb can also be parameterized. These parameters allow you to set the version of the Pulumi client to download, to choose whether the update should skip its preview, etc. For more on parameterization of the orb, see the full orb reference.
With other CI/CD systems, you’d typically need to write one-off Bash scripts to download the client from https://get.pulumi.com, add it to the current
$PATH, and so on. Orbs allow for simpler, more declarative, CI/CD workflows.
Pulumi’s integration with CircleCI doesn’t end with orbs. Newer versions of the Pulumi command-line client will start associating CircleCI build metadata with stack updates, so you you will soon see links from https://app.pulumi.com to any stack updates or previews that happened during a CircleCI workflow.
Additionally, if you are using CircleCI with GitHub, consider installing the Pulumi GitHub application. The Pulumi GitHub app will surface the results of any previews or updates from your CI/CD on the source GitHub pull request. It’s always good to know if a pull request is going to lead to changes to your cloud infrastructure!
Pulumi is proud to be a part of CircleCI’s Technology Partner Program, and we are excited to get a head start on seeing how orbs will make it easier to take Pulumi into production within CircleCI. The Pulumi orbs for CircleCI are now available for you to start using.
We are always working to make Pulumi the best tool for the “continuous deployment” part of CI/CD workflows, and with the release of CircleCIs orbs, it’s just that much easier.
Chris Smith is a staff engineer at Pulumi, building the future of cloud programming.