Use this to run Continuous Integration.
These examples use 2.4.1
for the Ruby version, which has the corresponding
Dockerfile. Change it to the Ruby version used in your project.
The examples build and deploy to staging and production. Add or remove environments to match yours.
- Create
bitbucket_pipelines.yml
. Two database examples are in this repo. - Set the correct Ruby version in it.
- Commit and push so that Bitbucket knows what to do.
- Enable Pipelines in the project.
- Set the project environment variables in Bitbucket (see below).
You will need some environment variables.
Repository Environment Variables
-
SENTRY_PROJECT
- the name of the project in Sentry
Deployment Environment Variables
When deployed to Cloud 66:
-
REDEPLOYMENT_HOOK
- the production Cloud 66 redeployment hook -
STAGING_REDEPLOYMENT_HOOK
- same for staging (if applicable)
Account Variables
-
SENTRY_AUTH_TOKEN
- Sentry authentication token -
SENTRY_ORG
- should be set tospace-babies
For an entirely new Ruby version, copy one of the existing directories. Then build the image and/or make changes to the Dockerfile so that it builds cleanly and has everything required.
Create a repo on Docker Hub if it doesn't exist already.
To publish an image:
docker build -t spacebabies/ci-2.4.1:latest 2.4.1
docker push spacebabies/ci-2.4.1:latest