How do I set up Circle CI to deploy to Enclave?

To deploy from Circle CI on Aptible, we recommend the following approach:

  1. Create a “Robots” role in your Aptible organization, and grant it “Read” and “Manage” permissions on your production account.
  2. Invite a new deploy user to this Robots role. It needs to have a real email address, but can be something like
  3. Generate an SSH key pair for the deploy user (you can do this via: ssh-keygen -f deploy.pem). Don’t set a password for the key, since that won’t work well on Circle CI.
  4. Accept the invitation for, activate the account, and upload the public key from Step 3 on your Aptible User Settings page.
  5. Upload the private key to your project by visiting the Project Settings > SSH keys page on Circle CI.
  6. Add a custom deploy step, following Circle’s instructions. It should look something like:
      branch: production
        - git push$ENVIRONMENT_HANDLE/$APP_HANDLE.git $CIRCLE_SHA1:master

The Enclave Platform