Pantheon Community

A Pantheon CircleCI orb

Hello Pantheon community!

Pantheon uses CircleCI for many of our continuous integration examples. The most well known are our example-drops-8-composer and example-wordpress-composer repos that show a complex Composer-based GitHub -> CircleCI -> Pantheon workflow.

Being composer-based, these repos can overwhelm people looking for a simpler flow who just want a way to move changes from GitHub to Pantheon and maybe add in something like Sass compilation or an automated test.

Enter a CircleCI orb. “Orbs” are a way of encapsulating CircleCI configuration so that the config can be centrally maintained and updated. They’re kinda like modules or plugins in Drupal and WordPress in that way.

Pantheon recently signed on with Circle to write an orb. There are a lot of things this Orb could eventually do. So far I’m limiting it to move code from GitHub (or BitBucket) to Pantheon through Circle.

I’m looking for feedback on this initial release that handles pushing to Pantheon from GitHub: https://github.com/pantheon-systems/circleci-orb Please test it out if you have a site on Pantheon without a corresponding GitHub/CI set up.

If you hit specific blockers/errors/questions, please file them in the issue queue: https://github.com/pantheon-systems/circleci-orb/issues

Nice job on this, Steve! I set up a test site without too much trouble, and it works! Seeing the red fails turn green really is satisfying. :slight_smile:

I think it’d be great to reduce the amount of manual setup involved here, though – I’m very +1 for https://github.com/pantheon-systems/circleci-orb/issues/9. I like the idea of a Terminus plugin or new command for the existing build tools one.

For me, the config on CircleCI was the less-familiar piece, so these steps took a little futzing around:

  • setting up the project (which OS do I want? which languages? when do I hit the Start Building button?)
  • adding my SSH key to CircleCI (I hit a few validation errors and needed to adjust the command used to create the key)

Looking forward to adding more build steps to my test site. :rocket:

Thanks @sarahg! Do you know what command you ended up running for the SSH key generation?

I’d imagine the command in the README will work for most people and my shenanigans were an edge case – I have a dev release of OpenSSL installed via Homebrew.

Adjusting my $PATH to use the default OSX ssh-keygen cleared up my issue. Before I did that, I couldn’t create a key without a passphrase, and I was getting OpenSSH-style private keys instead of RSA ones (and both of these things throw “invalid key” errors on CircleCI).

Anyways probably not worth noting in the README but something to keep in mind for troubleshooting.