At a high level, integrating Aptible Deploy with your CI platform boils down to the following steps:
- Create a robot User in Aptible for your CI platform.
- Trigger a deploy to Aptible Deploy whenever your CI completes. How you'll do this depends on how you're deploying to Aptible Deploy:
- Create a "Robots" Role in your Aptible Organization, and grant it "Read" and "Manage" Permissions on the Environment you'd like to automate deployment to.
- Invite a new user to this Robots role. It needs to have a real email address. Most customers use something like
- Log out of your Aptible account, accept the invitation you received for the robot user by email, and create a password for the robot user.
- Generate a SSH key pair for the deploy user using
ssh-keygen -f deploy.pem. Don't set a password for the key.
- Register the SSH Public Key with Aptible Deploy for the robot user.
Most CI platforms expose some form of "after-success" hook you can use to trigger a deploy to Aptible Deploy after your tests have passed. You'll need to use it to trigger a deploy to Aptible Deploy by running
git push to work, you'll also need to provide your CI platform with the SSH key you created for your robot user. To that end, most CI platforms let you provide encrypted files to store in your repository.
To deploy with Direct Docker Image Deploy, you'll need to build and publish a Docker Image when your build succeeds. Then, you can install the Aptible CLI in your CI environment, log in as the robot user, and use
aptible deploy to trigger a deploy to Aptible Deploy.
Updated 23 days ago