-
Notifications
You must be signed in to change notification settings - Fork 1
CircleCI
We use CircleCI for our continuous integration and delivery method. As long as your a member of this GitHub team, you should have access to the Circle builds.
- Log into Circle
- Click "Projects" in the left navigation column
- Click "Add Project" in the top-right corner
- Select the "byuoitav" organization
- Locate the project in question
- Click "Build project"
In general, most of our projects should already be building on Circle. In this case, you need to tell your Circle dashboard to follow the project. To do this, follow the steps outlined above and notice that the "Build project" button instead reads "Follow project".
Be sure to use Ubuntu 14.04 in "Build Environment" for projects involving the Go programming language. The other build environments use Go installs that are a few versions behind the latest.
- On the left side of your Circle dashboard, hover over the project in question
- Click the settings gear icon that appears
- In the navigation menu on the left, select "Build Environment" under "Build Settings"
- Select "Ubuntu 14.04 (Trusty)"
The page auto-saves changes.
Our build pipeline relies on environment variables being set in Circle.
Any project that is pushed to Docker Hub needs to have the DOCKER_USERNAME
, DOCKER_PASSWORD
, and DOCKER_EMAIL
environment variables set. Follow the below steps to set environment variables in Circle.
- On the left side of your Circle dashboard, hover over the project in question
- Click the settings gear icon that appears
- In the navigation menu on the left, select "Environment Variables" under "Build Settings"
- Click "Add Variable" near the top-right corner
- Provide the "Name" and "Value"
- Click "Add Variable" in the bottom-right corner of the modal
For security reasons, environment variables in Circle cannot be edited. If you need to change the value of an environment variable, delete the existing variable and create a new one with an identical key name.
We have a handy tool that deletes an existing variable and creates a new one with an identical key.
Setup:
- Clone down the team repository and append the path to the repository to
$PATH
. - Set another environment variable called
CIRCLE_USERNAME
(this corresponds with the user that created the Circle project, so it will generally bebyuoitav
. - Log into Circle and choose "Account Settings" from the navigation menu on the left.
- Click "Personal API Tokens", then "Create New Token".
- Use the new token to create another environment variable called
CIRCLE_API_TOKEN
. (The API tokens are unique, so do not add them to the gopass store)
Use:
circleup <PROJECT> <VARIABLE> <NEW VALUE>
For Example
circleup configuration-database-microservice DOCKER_EMAIL monsters
In order for [[deploy.sh
|Deployment-Files#deploysh]] to successfully deploy builds to AWS, we must provide Circle with our AWS CLI credentials.
- On the left side of your Circle dashboard, hover over the project in question
- Click the settings gear icon that appears
- In the navigation menu on the left, select "AWS Permissions" under "Permissions"
- Paste in the AWS access key and secret access key into the appropriate fields
- Click "Save AWS keys"
If you don't have the team's AWS credentials, ask a teammate.
For each new project added to Circle, Slack integration must be set up manually.
On each repository being built by Circle, there is a badge in the README
representing the state of the last build in Circle. If a build is marked as "failing", there are a number of possible causes. If this is the case for your repo, check the Circle logs.
Know that a build may succeed but fail to push to the deploy server hosted at AWS. This registers as a "failure".