Reusable CI/CD components with CircleCI Orbs for Pulumi
This morning CircleCI announced the launch of CircleCI Orbs which enable 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 Pulumi enables you to simplify the delivery of your cloud native infrastructure by sharing and reusing existing components.
Pulumi is proud to be a CircleCI technology partner, and we were excited to get a head start on seeing how orbs could make it easier to take Pulumi into production within CircleCI. The Pulumi Orbs for CircleCI are available today for you to start using.
You can see the Pulumi orbs in-action in the following CircleCI
version: 2.1 Orbs: pulumi: email@example.com 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 fixed version) are referenced by the name
firstname.lastname@example.org. Then, the two Pulumi orbs
pulumi/update are invoked.
CircleCI orbs can be parameterized, so you can set the version of the Pulumi client to download, whether the update should skip its preview, and so on. (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
$PATH and so on. Orbs allow for simpler, more declarative
The source code for the Pulumi orbs is available on GitHub, if you have any suggestions or feedback.
Of course 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.
Also, if you are using CircleCI with GitHub, you can 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!
We are continuing 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.