CircleCI - VisionSystemsInc/voxel_globe GitHub Wiki
CircleCI is used for the CI testing for voxel_globe. CircleCI has many beneficial features over the competitors out there
- Support for submodules. While this support is broken... it's there? Not a strong selling point
- Free docker support. This is big. However they use lxc containers and docker 1.9.1, which is getting old.
- Caching directories. I think this is standard
- 120 Minutes PER command. This is WAY better than Travis's 120 Minutes per entire run
- Free support for private repos (although limited to 1500 minutes per month of testing)
If you use private docker images, you'll need to add a docker login, like so
machine:
services:
- docker
post:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASSWORD
then go to Project Settings -> Environment Variables to add DOCKER_EMAIL
, DOCKER_USER
, and DOCKER_PASSWORD
Setting up ssh keys is the hardest part of getting submodules working. Once you do that, you simply add
checkout:
post:
#Set up submodules
- git submodule sync
#checkout submodules
- git submodule update --init
Unfortunately, the auto deploy keys are not going to work for multiple repositories (as of 12/9/15)
- First create an ssh key yourself.
- Log into every repo on github/bitbucket and add that ssh key as a deployment key (read only is all you need)
- Optionally, you can add this as a user key, but that is less secure
- On CircleCI, add the ssh private key as a global ssh key. Project Settings -> SSH Permissions -> Add SSH Key, and leave hostname blank
dependencies:
cache_directories:
- "~/vxl"
override:
#Install git-lfs
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
- sudo apt-get install git-lfs
#Get lfs files
- git lfs pull
In my case, the passwords are hard coded. In other cases, you MAY need to add
- ssh [email protected] git-lfs-authenticate <user>/<project>.git download
However, I don't understand what that does
Setting up voxel_globe is pretty basic
dependencies:
override:
- ./just install stop postgresql
And to optionally add caching of the vxl build, add
machine:
environment:
VIP_VXL_VOLUME: ${HOME}/vxl
dependencies:
cache_directories:
- "~/vxl"
And the rest is straightforward
test:
pre:
- ./just start
override:
- ./just test
post:
- ./just stop
In order to get all the unit test passing, the VIP_PLANET_LABS_API_KEY
environment must be set to your API key. Go to Project Settings -> Environment Variables to add this