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.

If you haven’t used Pulumi, then you can try it here. Pulumi enables you to describe any cloud infrastructure (from VMs, to containers and Kubernetes, to Serverless) on any cloud using familiar programming languages such as JavaScript or Python.

Pulumi orbs

You can see the Pulumi orbs in action in the following CircleCI config.yml file. It’s a simple job to build and update a JavaScript-based stack:

version: 2.1
  pulumi: pulumi/pulumi@1.0.0
      - image: circleci/node:7.10
    working_directory: ~/repo
      - 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 pulumi/pulumi@1.0.0. Then, the two Pulumi orbs pulumi/login and pulumi/update are invoked as steps in the build job.

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, add it to the current $PATH, and so on. Orbs allow for simpler, more declarative, CI/CD workflows.

Additional integrations

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 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!

Wrapping up

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.